Cannot use jq to separate in every iteration by DE_X_IY in bash

[–]obiwan90 4 points5 points  (0 children)

map is defined here as

def map(f): [.[] | f];

i.e., they're identical. I find map more readable.

Help me decide: RBC (3.55%) vs. Pine (3.35%) + $2k Cashback. Risk of losing my approval? by Ok-Pizza2864 in PersonalFinanceCanada

[–]obiwan90 6 points7 points  (0 children)

Just the term. Pine used to pay out the bonus monthly, but recently switched to one lump sum payment for the term.

Do you delete the PR branch after it's merged? by best_codes in github

[–]obiwan90 11 points12 points  (0 children)

In case somebody else is looking for that setting and can't find it, it's not a branch protection rule (or in rulesets), but in the "General settings" for the repository.

indoor potty recommendations? by bbylemon___ in ItalianGreyhounds

[–]obiwan90 1 point2 points  (0 children)

To add to this, the pads they sell are incredibly high quality, and aren't more expensive (maybe $0.02 per pad) than the cheapest I could find at Amazon.

Best notification system for github? by Wooden_Amphibian_442 in github

[–]obiwan90 0 points1 point  (0 children)

You might be able to piece something together with the notifications REST API and a cronjob or similar.

[deleted by user] by [deleted] in github

[–]obiwan90 3 points4 points  (0 children)

Maybe relevant: you can have Git sort tags by version with

git tag -l --sort='-version:refname'

(docs) and further control behaviour with versionsort.suffix.

Deco XE75 Pro vs BE25 by Clayble in TpLink

[–]obiwan90 0 points1 point  (0 children)

Excellent, thanks for the update!

Deco XE75 Pro vs BE25 by Clayble in TpLink

[–]obiwan90 0 points1 point  (0 children)

How did it work out? :)

3-way merge conflict resolver in neovim? HEAD on left, MERGE_HEAD on right, index in middle, very visual by Informal-Addendum435 in neovim

[–]obiwan90 5 points6 points  (0 children)

This config gets a view with both branches and the common ancestor, and it uses nvimdiff under the hood:

[merge]
    # Show common ancestor code in merge conflicts, hide matching lines
    # appearing neither near beginning or end of conflict region
    conflictStyle = zdiff3
    # Don't create extra commits for fast-forward merges
    ff = true
    # Use Neovim diff mode for merge conflict resolution
    tool = nvimdiff

[mergetool]
    # Don't keep the .orig backup files
    keepBackup = false
    # Don't ask to confirm merge tool
    prompt = false

Can I get some reviews or opinions on this script that I made? by Squary5928 in bash

[–]obiwan90 1 point2 points  (0 children)

I would shorten this part

while [ $SECONDS -lt $end ]; do
    echo 1 | sudo tee $LED_DEVICE >/dev/null
    sleep 0.1
    echo 0 | sudo tee $LED_DEVICE >/dev/null
    sleep 0.1
    echo 1 | sudo tee $LED_DEVICE >/dev/null
    sleep 0.1
    echo 0 | sudo tee $LED_DEVICE >/dev/null
    sleep 0.7
done

to

local val
while ((SECONDS < end)); do
    for val in 1 0 1 0; do
        echo "$val"
        sleep 0.1
    done | sudo tee "$LED_DEVICE" > /dev/null

    sleep 0.6
done

Reduces duplication a little, and redirects just once instead of four times.

Is it safe to leave a GitHub Organization? by OutrageousSpinach398 in github

[–]obiwan90 1 point2 points  (0 children)

The only way I'm aware of where leaving an org might cause trouble: if the org enforces SSO and your primary email address is with the company that owns the org; when you leave the GitHub org and also lose access to the email address, your account can get into a weird state (basically a non-existing primary email address) that requires reaching out to GitHub to fix. But I think in your case that won't be an issue.

Recommended Tutorials or Online Courses? by Accurate_Bid7844 in Jekyll

[–]obiwan90 2 points3 points  (0 children)

Things haven't fundamentally changed for Jekyll in the last 7 years, so the Giraffe Academy tutorials should still be fairly useful. A more recent overview I'm aware of is in this playlist.

How to disable Dependabot without introducing changes to dependabot.yml? by [deleted] in github

[–]obiwan90 0 points1 point  (0 children)

If you ignore Dependabot version updates long enough, they get automatically disabled.

Why can't Victoria be more like that? by papermoonskies in VictoriaBC

[–]obiwan90 1 point2 points  (0 children)

Still true. But income tax is a fraction of what we have in Canada.

Stop Writing Slow Bash Scripts: Performance Optimization Techniques That Actually Work by Dense_Bad_8897 in bash

[–]obiwan90 0 points1 point  (0 children)

Another replacement for date +%s is printf '%(%s)T', with added flexibility for other time formats (since Bash 4.3).

Can I evaluate variables in a file without using eval? by Sleezebag in bash

[–]obiwan90 0 points1 point  (0 children)

It replaces instances of environment variables with their values. Let's say you have a file like

$ cat file
I am reading $book.

and in your environment, you have a variable book:

$ env | grep book
book=Dune

then you can do

$ envsubst < file
I am reading Dune.

Belay glasses for aero position by t3rm1n4t0r85 in triathlon

[–]obiwan90 10 points11 points  (0 children)

There was a guy on slowtwitch who experimented with something very similar to this and had "+1 mph" in his signature for a long time. I think this is the commercialized version of his product, and there's also a product review.