Skip to content

Instantly share code, notes, and snippets.

View raphaelbs's full-sized avatar
🚀
Eager so see people landing on the moon again

Raphael Brandão raphaelbs

🚀
Eager so see people landing on the moon again
View GitHub Profile
@raphaelbs
raphaelbs / himawari-workaround.sh
Created February 19, 2019 20:58
Set Himawari as dekstop and lockscreen
#!/bin/bash
# http://bit.ly/2ines3u
# Wallpaper's directory.
dir="${HOME}/.cache/himawaripy/"
# export DBUS_SESSION_BUS_ADDRESS environment variable
PID=$(pgrep gnome-session)
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ | cut -d= -f2-)
@raphaelbs
raphaelbs / git-clean.sh
Last active March 7, 2024 17:41
Prune git branches and update default branch
#!/bin/bash
BRANCH=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')
echo "Update changes"
git fetch -u origin $BRANCH:$BRANCH
git pull --ff-only origin $BRANCH:$BRANCH
echo "Changing branch to $BRANCH"
git checkout $BRANCH
echo "Prunning local branches that were removed in remote..."
git remote update --prune
@raphaelbs
raphaelbs / jest-shortcut-gen.sh
Last active November 3, 2020 15:29
Generate shortcuts for Jest tests
#!/bin/bash
LOCAL=/usr/local/bin
TEST_WATCH="tw"
TEST_COVERAGE="tc"
JEST="./node_modules/jest/bin/jest"
echo "Add test watch script \"$TEST_WATCH\" at $LOCAL/$TEST_WATCH"
echo "#!/bin/bash" > "$LOCAL/$TEST_WATCH"
echo "echo \"Testing w/ watch with pattern: \$1\"" >> "$LOCAL/$TEST_WATCH"

Keybase proof

I hereby claim:

  • I am raphaelbs on github.
  • I am raphaelbs (https://keybase.io/raphaelbs) on keybase.
  • I have a public key ASDTorEHhsVyUWwWCT7VzzTOvxpsrIjv7bozK4ii8ioYNQo

To claim this, I am signing this object: