owsei

joined 2 years ago
[–] owsei@programming.dev 8 points 2 weeks ago (2 children)

wait POS doesn't mean piece of shit??

[–] owsei@programming.dev 4 points 2 weeks ago* (last edited 2 weeks ago)

I made this one to find binaries in NixOs and other systems

get_bin_path() {
        paths=${2:-$PATH}
        for dr in $(echo $paths | tr ':' '\n') ; do
                if [ -f "$dr/$1" ] ; then
                        echo "$dr/$1"
                        return 0
                fi
        done
        return 1
}

Then I made this one to, if I have a shell o opened inside neovim it will tell the neovim process running the shell to open a file on it, instead of starting a new process

_nvim_con() {
        abs_path=$(readlink --canonicalize "$@" | sed s'| |\\ |'g)
        $(get_bin_path nvim) --server $NVIM --remote-send "<ESC>:edit $abs_path<CR>"
        exit
}

# start host and open file
_nvim_srv() {
        $(get_bin_path nvim) --listen $HOME/.cache/nvim/$$-server.pipe $@
}

if [ -n "$NVIM" ] ; then
        export EDITOR="_nvim_con"
else
        export EDITOR="_nvim_srv"
fi

Lastly this bit: which if it detects a file and a line number split by a : it will open the file and jump to the line

_open() {
        path_parts=$(readlink --canonicalize "$@" | sed s'| |\\ |'g | sed 's/:/\t/' )
        file=$(echo "$path_parts" | awk ' { print $1 }' )
        line=$(echo "$path_parts" | awk ' { print $2 }' )

        if [ -n "$line" ] ; then
                # has line number
                if [ -n "$NVIM" ] ; then
                        $(get_bin_path nvim) --server $NVIM --remote-send "<ESC>:edit $file<CR>:+$line<CR>"
                        exit
                else
                        $(get_bin_path nvim) --listen $HOME/.cache/nvim/$$-server.pipe $file "+:$line"
                fi
        else
                $EDITOR $file
        fi
}

alias nvim="_open"

all of my bash config is here

[–] owsei@programming.dev 9 points 3 weeks ago

I agree that forcing return to office is either stupid or harmful. But I do like the people I work with, and not seeing them anymore would be saddening

The solution is obvious though, simply allow choice

[–] owsei@programming.dev 4 points 4 weeks ago (2 children)

Oh yeah, 100%

No, that's the entire curriculum [...]

I was asking about what country has US meddling as a considerable fraction of the curriculum

[–] owsei@programming.dev 5 points 4 weeks ago (4 children)

Which country?

In Brazil there have been several pretty important meddlings, but at most the schools say that there where "several parties involved"

Like our dictatorship, where I'd only learnt "other countries incentivized the coup"

[–] owsei@programming.dev 1 points 1 month ago (1 children)

Fuck it.

today's freezing, but I'll go to the gym too :)

[–] owsei@programming.dev 3 points 1 month ago

o, a, os, as for "the"

um, uma, uns, umas for "a"

both lists mean: singular masculine, singular feminine, plural masculine, plural feminine.

and if the gender is unknown or mixed you use the masculine

[–] owsei@programming.dev 2 points 1 month ago

Oohh thanks

I've found the poem, I thought it was this one because of the amount of "shi"s. But yours is way bigger

[–] owsei@programming.dev 5 points 1 month ago

The ideia of gramatical gender is kept, but the specific genders may be different, so it's still pretty hard

At least that's how I felt when learning spanish or french

[–] owsei@programming.dev 8 points 1 month ago

What? no

I know portugueses and spanish and I'm learning french and it make it all even more complex

Since in one language it's something, in anofher it's something else

[–] owsei@programming.dev 1 points 1 month ago (4 children)

Oh this is the lion rock pasta cave thing?

[–] owsei@programming.dev 6 points 1 month ago (1 children)

Why would 2580 be common?

view more: β€Ή prev next β€Ί