[-] unlawfulbooger 12 points 1 week ago

If you’re not already, just erase your darlings.

Then you can preview what files are lost on reboot (see blogpost).

[-] unlawfulbooger 11 points 1 month ago

Here's an article that does this: https://iridakos.com/programming/2018/03/01/bash-programmable-completion-tutorial

I have done this for one of my own tools ta, which is a function that switches to a tmux session, or creates it if it doesn't exist:

# switch to existing tmux session, or create it.
# overrides workdir if session name is "Work"
function ta() {
        case "$1" in
                Work) workdir="${HOME}/Work/" ;;
                *) workdir="${HOME}" ;;
        esac
        if tmux has-session -t "$@" &>/dev/null; then
                tmux switch-client -t "$@"
        else
                tmux new-session -A -D -d -c "${workdir}" -s "$@"
                tmux switch-client -t "$@"
        fi
}

# complete tmux sessions
# exclude current session from completion
function _ta_completion() {
        command="${1}"
        completing="${2}"
        previous="${3}"
        [[ "${command}" != 'ta' ]] && return
        current_session="$(tmux display-message -p '#S')"
        IFS=$'\a' COMPREPLY=( $(tmux list-sessions -F '#{session_name}' | grep -i "^${completing}" | grep -v "^${current_session}$"| tr '\n' '\a' ) )
}
# enable completion for ta function
complete -F _ta_completion ta

Usage

$ tmux (starts session "0" by default)
$ ta Personal # create session "Personal" because it doesn't exist
$ ta Work # create session "Work" because it doesn't exist
$ ta <tab> 
0 Personal
$ ta P<tab> -> $ta Personal
$ ta <tab>
0 Work
[-] unlawfulbooger 14 points 5 months ago

Weird that there’s no mention of the talk between Hasan and Asmongold. I’m pretty sure that Hasan’s patience while explaining the Palestinian struggle was the biggest thing that made him change on that as much as he did.

[-] unlawfulbooger 10 points 5 months ago* (last edited 5 months ago)

It was new to me too, but a (code) forge is essentially a VCS server with stuff like a wiki and issue tracking. So think GitLab, GoGS/Gitea/Forgejo, BitBucket and all the others.

[-] unlawfulbooger 11 points 11 months ago* (last edited 11 months ago)

I just started playing it and it’s pretty fun so far.

I made a low INT character, because playing low INT on Outer Worlds was pretty fun

[-] unlawfulbooger 11 points 11 months ago

Exactly, ansible is basically imperative, where write the steps declaratively.

Whereas nixos is more like a compiler that compiles to a working linux install.

If I added the software myprogram and a config file at /etc/myprogram.conf, that’s pretty easy in both. But if I needed to to then remove those it gets different .

With nixos it’s at easy as removing the two lines that add the program and the config file; after the next “compile”, the file is gone and myprogram is no longer available in the PATH.

With ansible you need to change the relevant step to use apt remove instead of apt install and to change the config file step in a step that removes the file.

Don’t get me wrong, ansible is still better than writing a lot of bash scripts, especially if you don’t have people with a lot of shell experience.

But tools like nixos and guix are on a whole other level.

[-] unlawfulbooger 11 points 11 months ago* (last edited 11 months ago)

Exactly, if we do a back of the napkin calculation:

Bitcoin

Users

There are 200 million bitcoin wallets, let’s be generous and say those are all owned by unique individuals.

Total energy consumption

Bitcoin used about 114 TWh in 2021[1]

Bitcoin currently uses about 150 TWh annually

Energy consumption per user

150 TWh / year 
————————— = 0,75 TWh / user / year
200 million users

Banking system

Users

There are over 8 billion people on the planet today, let’s assume 4 billion of them have access to the global banking system.

Total energy consumption

The global banking system used an estimated 264 TWh in 2021[1]

If we assume the same consumption increase rate for banking, that’s about 348 TWh/year currently.

Energy consumption per user

348 TWh / year 
————————— = 0,087 TWh / user / year
4.000 million users

With these numbers, bitcoin uses almost 10x the energy per user annually.

There are of course a myriad of things one can argue over whether it makes a fair comparison, none of which I feel like arguing, since this is just a really simple estimate with a lot of assumptions.

1: I used the numbers in this article uncritically, if you have better numbers you can run your own calculations.

[-] unlawfulbooger 11 points 11 months ago

Yes, but so do hospitals?

That down mean that every worker has to come in 7 days a week tho, right?

[-] unlawfulbooger 10 points 1 year ago

I found this different version a while back

[-] unlawfulbooger 10 points 1 year ago
[-] unlawfulbooger 10 points 1 year ago* (last edited 1 year ago)

Ah, dang :(

Edit: thanks for proofreading the β version of the meme :)

[-] unlawfulbooger 11 points 1 year ago

This is so cursed, thank you

view more: ‹ prev next ›

unlawfulbooger

joined 2 years ago