Skip to main content



Cheatsheet script for displaying Linux command examples


This entry was edited (1 year ago)
in reply to thingsiplay

This looks great.

Suggestion: a step-by-step "howto" with an example or three to make it more useful for beginners.

in reply to Einar

Thanks. Is this suggestion towards this ? script or the output from the cheat.sh web service? Because I'm not the author of the web service itself, I just created this script to make use of it.


Basic examples for the Linux date command


I rarely ever use the date command, but when I need it I almost always struggle to get the right incantation. So, wrote a blog post for easy reference.

Do you use a cheatsheet as well?

in reply to learnbyexample

LLMs do this pretty well. I've used them for date/time formatting strings across a number of languages.
in reply to atzanteol

date is the command for setting the system date and time from the command line. Nothing to do with formatting, beyond the fact that it presumably applies system locale settings when echoing date-time info.
in reply to nyan

 date +%Y-%m-%d
This entry was edited (1 year ago)
in reply to nyan

$ whatis date

date (1) - print or set the system date and time

in reply to atzanteol

They once wrote me a massive script for parsing a history file instead of telling me about history -i
in reply to JackbyDev

The other "real person" who replied to me told me that the Linux date command has nothing to do with formatting.
in reply to atzanteol

Second sentence of the description from the man pages, "Otherwise, depending on the options specified, date will set the date and time or print it in a user-defined way." not sure what they were on about.
in reply to JackbyDev

Right - I'm just saying that it's super annoying that people point out times that llms have been wrong as though humans are never wrong, or even aren't wrong frequently.
in reply to atzanteol

I get that. It's funny I think I've gotten advice in the past to always check the results of search engines because they can be wrong (as in teachers said it to me) or things about Wikipedia being unreliable. But nobody does those things nowadays. Perhaps someday LLMs will be good enough that we don't need to check them either.
in reply to learnbyexample

I'm addition to tldr which someone else suggested, there's also the cheat command. It's pretty easy to add to it's cheat sheets, if you have custom commands, or want to keep a specific example. I've never kept a physical cheat sheet... They're just too inconvenient and my fingers are probably already at the keyboard.

in reply to John

With the speed HDR prep works are going on, we probably get usable HDR in linux around 2025

in reply to fern

For all I know, new versions probably run fine in current OSs. But I don't own new versions. I could use open source stuff that has less features and less creature comforts, but then I also need to dedicate a newer laptop to the go box.

The whole point of that hobby is reliability and stability. Those old lenovos are tanks and I have spares for days.



A new way to develop on Linux - Part II


This entry was edited (1 year ago)
in reply to John

Article picture is of a mac and even better, touchbar controls are for photos.

I love those very real tech pics.



Andries Brouwer on the OOM killer


reshared this

in reply to pnutzh4x0r

I started using one of the userspace oom killers a while ago and have been much happier. Instead of the system becoming unresponsive, suddenly Slack just dies. It's great.
in reply to Beej Jorgensen

Why is it though that the system just becomes unresponsive? That is always my experience too, but shouldn't just the kernel's OOM killer kill something?
in reply to ReversalHatchery

Yes that's true however the default OOM killer tries its best to save the processes first and it can take while sometimes it took for me over 30 mins until it killed the bad process and then it all became responsive again.
in reply to ReversalHatchery

I don't know the details behind it, but it sure takes its sweet time figuring it out. I've let it sit 20 minutes before giving up.


Open Source extension that greatly increases streaming speeds


I recently discovered this firefox\chrome extension that make streaming videos soo much faster. It also has built in subtitle support that lets you upload subtitles or search through opensubtitles. It's incredible how much faster videos load github.com/Andrews54757/FastSt…

reshared this

in reply to XNX

Looks like it has some issues when used with sponsorblock github.com/Andrews54757/FastSt…
in reply to RobotToaster

The youtube player is pretty good for me so i only use it on streaming sites but thanks for reporting that
in reply to XNX

Just having the video player be the same across all sites is a win, I don't even need the multi-threading or pre-cache entire video to love this.


Åklagare har väckt åtal i ett ärende där en man i 20-årsåldern sköts till döds i Sätra centrum i södra Stockholm den 7 augusti 2023. Sju personer har åtalats för inblandning i mordet. Utöver det åtalas även tre personer för grovt vapenbrott. Samtliga åtalade är häktade.

blog.zaramis.se/2024/08/22/sju…

This entry was edited (1 year ago)


Why I Prefer Minetest To Minecraft - YouTube


reshared this

Unknown parent

lemmy - Link to source
EveryMuffinIsNowEncrypted
Thanks for the tl;dr!
Unknown parent

lemmy - Link to source
EveryMuffinIsNowEncrypted

Hell yeah.

Let's fucking goooooooo!

This entry was edited (1 year ago)


Replacing M.2 system drive (btrfs) on motherboard with single slot


This entry was edited (1 year ago)

reshared this

in reply to minimalfootprint

Clonezilla can clone BTRFS without issues

Afterwards on the system use sudo btrfs filesystem resize max / to make it use that space. Maybe add a balance.

in reply to minimalfootprint

If you're feeling adventurous:

  • You can use a thumb drive to boot.
  • Verify the device path for your normal boot disk and for your new drive using gnome disks or similar. In this example I'll call them /dev/olddisk0n1 and /dev/newdisksda
  • really, really don't mix up the in file and out file. In file (if) is the source. Out file (of) is the destination.
  • sudo dd if=/dev/olddisk0n1 of=/dev/newdisksda bs=128M
  • or, of you want a progress indicator: sudo pv /dev/olddisk0n1 > /dev/newdisksda
  • wait a long time

Not that this is the recommended method if you're new to the terminal, but it's totally viable if you have limited tools or are comfortable on the command prompt.

Unless you're using three new disk on the same system, you don't have to worry about UUIDS, though they will be identical on both drives.

Your system is likely using UUIDs in fstab. If so, you don't have to worry about fstab. If not, there's still a damned good chance you won't have to worry about fstab.

To be sure, check fstab and make sure it's using UUIDs. If it's not, follow a tutorial for switching fstab over to using UUIDs.

This entry was edited (1 year ago)


What the fuck is an SBAT and why does everyone suddenly care


reshared this

in reply to pnutzh4x0r

lol i dont care, ive stopped dual booting for like a year


FOSS JS extension? (blocking by default non-FOSS JS)


I am a long-time NoScript extension (noscript.net/) user. For those who don't know this automatically blocks any javascript and let you accept them (temporarily or permanently) based on the scripts' origin domain.

NoScript as some quality-of-life option like 'accepting script from current page's domain by default' so only 3rd parties would be blocked (usefull in mobile where it is tedious to go to the menu).

When I saw LibreJS (gnu.org/software/librejs/) I though that would be a better version of NoScript but it is quiet different in usage and cares about license and not open-source code (maybe it can't).

Am I the only one who thought about checking for open-source JS scripts filtering (at least by default)? This would require reproducibility of 'compilation'/packaging. I think with lock files (npm, yarn, etc) this could be doable and we could have some automatic checks for code.

Maybe the trust system for who checks could be a problem. I wanted to discuss this matter for a while.

reshared this

in reply to Kajika

This entry was edited (1 year ago)
in reply to 9point6

I believe you missed the point, I am not in defense of Security through obscurity (en.wikipedia.org/wiki/Security…), quiet the opposite.

The point: "[...] risk for the service owner as it gives an easily parsable way for an attacker to check [...]" is well known and not the discussion here. You can choose close source for 'security' this is opensource community so I am wondering about such a tool.

This entry was edited (1 year ago)
in reply to Kajika

Maybe I have missed your point, but based on how I've understood what you've described I think you may have also missed mine, I was more pointing out how the practicalities prevent such a tool from being possible from a few perspectives. I lead with security just because that would be the deal breaker for many service owners, it's simply infosec best practice to not leak the information such a tool would require.

Your filtering idea would require cooperation from those service owners to change what they're currently doing, right?

Perhaps I've completely got the wrong end of the stick with what you're suggesting though, happy to be corrected

in reply to 9point6

Thanks for your answer.

First I don't even grasp what a "service owner" is.

Second, for JS front-end openness there are already a bunch of app (web, android) that are open-source and secured. Everything has dependencies nowadays, this doesn't prevent good security. Think all the python app and their dependencies, rust, android... even c\c++ packages are built with dependencies and security updates are necessary (bash had security issues).

I think with JS scripts it's actually even easier to have good security because the app is ran in our web browser so the only possible attacker is the website we are visiting itself. If they are malicious then the close-sourced JS script is even worse. Unless you count 3rd party scripts embedded that bad dev uses in their website without even thinking about trusting them. That is also awful in both open or close source environment.

So even having imperfect security (which happens regardless to openness), who is the attacker here? I would rather run js script on my end if the code can be checked.

in reply to Kajika

in reply to 9point6

OK I got it, you are completely out of the loop here.

You do not grasp the idea of NoScript and other JS filtering extension. This is not about server code, your all arguments is baseless here.

By the way JS refered to Javascript and not NodeJS.

Anyway I got you whole company/business talk about "keeping the service available, secure, performant" and "GDPR [...] bankrupting fine"... yeah lemmy.world.

in reply to Kajika

This entry was edited (1 year ago)
in reply to Kajika

I'm a full-stack software developer working in the financial sector, their statement is factual.

Companies will never want to take on liability that has the potential to bankrupt them. It is in their best interest to not reveal the version of libraries they are using as some versions may have publicly known vulnerabilities, and it would make it incredibly easy for attackers to build an exploit chain if they knew the exact versions being used.

Securing client code is just as important as securing server code, as you don't want to expose your users to potential XSS attacks that could affect the way the page gets displayed, or worse, leak their credentials to a third party. If this happened in the EU or some parts of Canada, and it's been found that the company reduced their threat model "for the sake of openness", they would likely be fined into bankruptcy or forced to leave the market.

Unfortunately, this is one of those cases where your interests and ethics will never be aligned with those of service owners as they are held to a certain standard by privacy laws and other regulations.

in reply to Kajika

Can't say that what you are looking for is common. This is the first time I've heard this requirement bring described.

Librejs started a long while back. I'm no js historian but I reckon things have changed a ton in jsland since then. My guess is that there assumption is that since JavaScript files are just scripts, they contain the source code and therefore all it checks for is is the license.

I don't know at which point things like obfuscation through minification and systems like webpack came along. I'm only theorising but I feel librejs has not been able to keep up with the times.



Som en konsekvens av Elon Musks övertagande av Twitter urartade plattformen. Moderering avskaffades i praktiken och högerextremism, rasism och antifeminism med mer abredde ut sig.

blog.zaramis.se/2024/08/22/elo…

This entry was edited (1 year ago)
in reply to Det Glada Tjugotalet

Att modereringen upphört innebär i detta sammanhang att hatbudskap från högern med fler inte längre modereras bort. Det var i sammanhanget inte viktigt att gå närmare in på det. Utan det viktiga här var effekterna av Elon Musks övertagande.
in reply to Anders_S

X eller Twitter missgynnade dessutom vänstern långt innan Musk tog över. Så det är inget nytt. Även Facebook, Instagram och Threads missgynnar vänstern så just den detaljen är inte en unikt för X. Till och med Googlesökningar missgynnar vänstern (framförallt pro-palestinsk vänster).


Resume work from backup on another device?


reshared this

in reply to utopiah

Thank you for the detailed response!
Yes, the what data and how to not create conflicts has been troubling me the most.

I think I might first narrow it down with test VMs first, to skip the transfer part, before I actually use it “in production“.

in reply to unskilled5117

Honestly a very imperfect alternatives but that's been sufficient for me for years is... NextCloud of documents.

There are few dozen documents I need regardless of the device, e.g national ID, billing template, but the vast VAST majority of my files I can get on my desktop... which is why I replied to you in depth rather than actually doing it. I even wrote some software for a "broader" view on resuming across devices including offline, namely git.benetou.fr/utopiah/offline… as a network of NodeJS HTTP servers but ... same, that's more for the intellectual curiosity than a pragmatic need. So yes explore with VMs if you prefer but I'd argue remain pragmatic, i.e what you genuinely do need versus an "idealized" system that you don't actually use yet makes your workflow and setup more complex and less secure.



Nya Mediafonden har som syfte att hjälpa nya progressiva medier att växa. De hjälper många olika projekt varje år med en mindre summa pengar. Min blogg har i år fått 1 000 kronor från Nya Mediafonden och det tackar vi för.

blog.zaramis.se/2024/08/22/ett…




in reply to nous

I know, hence why i said youre not wrong but the example was wrong :p
Also, its more complex than that. Some teams can, some cant. And if they can it all depends on what project or context. The business world isnt that cut and dry hehe




Linux Market Share Reaches New Peak: July 2024 Report


The Linux operating system has reached a notable milestone in desktop market share, according to the latest data from StatCounter. As of July 2024, Linux has achieved a 4.45% market share for desktop operating systems worldwide.

While this percentage might seem small to those unfamiliar with the operating system landscape, it represents a significant milestone for Linux and its dedicated community. What makes this achievement even more thrilling is the upward trajectory of Linux's adoption rate.


...

According to the statistics from the past ten years, It took eight years for Linux to go from a 1% to 2% market share (April 2021), 2.2 years to climb from 2% to 3% (June 2023), and a mere 0.7 years to reach 4% from 3% (February 2024). This exponential growth pattern suggests that 2024 might be the year Linux reaches a 5% market share.

reshared this

in reply to pnutzh4x0r

It is finally upon us.

THE YEAR OF THE LINUX DESKTOP!

Terms and conditions apply. It could be the next year, or the year after, or not at all.

in reply to pnutzh4x0r

Did anybody bother to look at the numbers?

I checked the stats for the last 4 years here and it looks really strange.
Statistics isn't my thing... But it looks like it's wise to be cautious and not to fully trust the numbers.

Around the beginning of last year there was a huge dip in the Windows market share that seemed to be correlating with a peek in "unknown".
Windows then catched up in a somewhat erratic way.

Mac OS also shows a weird behavior.
Starts at 16%, up to 21% and the down to 14% between October and November...

It's not likely that a huge number of people decided to buy a Mac and then trash it one month later. Same but opposite goes for the windows stats.

I think it looks like there is an uncertainty of more than the total market share Linux is shown to have..

Not saying that Linux isn't increasing on desktop market share.
Just saying that numbers seen to have quite a bit error margin and to be cautious if referring to these numbers.