This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To delete all local branches that are already merged into the currently checked out branch: | |
git branch --merged | grep -i -v -E "master|develop"| xargs git branch -d | |
# To delete all local branches that no longer exist on the Remote | |
git branch -vv | grep ': gone]' | grep -v '\*' | awk '{ print $1; }' | xargs -r git branch -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reboot at 4:30am every day | |
# Note: To avoid infinite reboot loop, wait 70 seconds | |
# and touch a file in /etc so clock will be set | |
# properly to 4:31 on reboot before cron starts. | |
30 4 * * * sleep 70 && touch /etc/banner && reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Switch to Adguard setup | |
# Grab packages for AGH and updates. | |
opkg update | |
opkg install sudo ca-certificates ca-bundle curl wget tar unzip bind-tools | |
#grab and install AGH | |
curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -c edge | |
#now move DNSMasq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script archive 2 things here | |
# 1. boot the fresh simulator once, so we can reduce the boot time in UI test | |
# 2. Simulator shows swipe tutorial on first use of keyboard (iOS13 above), this script will set simulator preferences so it wont show the tutorial | |
function get_simulator_udid() { | |
echo '' | xcrun simctl list devices | grep "iPhone" | grep -v "unavailable" | awk -F "[()]" '{ for (i=2; i<NF; i+=2) print $i }' | grep '^[-A-Z0-9]*$' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git stash list| sed 's/\//\_/g'|sed 's/ /\_/g' | awk -F ":" '{ system("git stash show -p " $1 " >> " $1$2$3 ".diff" ) }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # get current folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.localhost.tilde-switch</string> | |
<key>StandardErrorPath</key> | |
<string>/tmp/tilde/tilde-err.log</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Borrowed & adapted from: https://github.com/brantb/dotfiles/blob/master/tmux.conf | |
# Set prefix to Ctrl-Space | |
unbind C-b | |
set-option -g prefix C-a | |
# using C-a as the tmux prefix comes at the cost of some great features: | |
# bash: move to start of line (in emacs mode, aka when i'm ssh'd somewhere) | |
# vim: insert mode increment number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Movement: | |
j, k down, up | |
h, l left, right (in some contexts) | |
space page down | |
pg up/down page up/down | |
arrows up, down, left, right |
NewerOlder