This file contains hidden or 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 | |
| t=$(date +%s) | |
| filename="screenshot-"$t".jpg" | |
| import /home/dtyler/Screenshots/$filename |
This file contains hidden or 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
| nnoremap ga :sh bash -c "gcalcli --nocolor --nostarted agenda \"`date`\""<CR> | |
| nnoremap gt :sh! xdotool key --window $VIMB_XID ctrl+shift+l<CR><Esc> | |
| nnoremap gT :sh! xdotool key --window $VIMB_XID ctrl+shift+h<CR><Esc> | |
| nnoremap 1gt :sh! xdotool key --window $VIMB_XID ctrl+1<CR><Esc> | |
| nnoremap 2gt :sh! xdotool key --window $VIMB_XID ctrl+2<CR><Esc> | |
| nnoremap 3gt :sh! xdotool key --window $VIMB_XID ctrl+3<CR><Esc> | |
| nnoremap 4gt :sh! xdotool key --window $VIMB_XID ctrl+4<CR><Esc> | |
| nnoremap 5gt :sh! xdotool key --window $VIMB_XID ctrl+5<CR><Esc> | |
| nnoremap 6gt :sh! xdotool key --window $VIMB_XID ctrl+6<CR><Esc> | |
| nnoremap 7gt :sh! xdotool key --window $VIMB_XID ctrl+7<CR><Esc> |
This file contains hidden or 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
| [dtyler@wimpy systemd]$ ls | |
| update-adblock-hosts updatehosts.service updatehosts.timer | |
| [dtyler@wimpy systemd]$ cat * | |
| #!/bin/sh | |
| /bin/gethostszero | |
| hosts-gen | |
| [Unit] | |
| Description=Update Hosts file for adblock | |
| [Service] |
This file contains hidden or 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 | |
| if [ $(git rev-parse --git-common-dir) = $(git rev-parse --git-dir) ]; then | |
| echo "Trying to reattach from inside a non-worktree is not possible" 1>&2 | |
| echo "${PWD}" | |
| exit 1 | |
| fi | |
| if [ ! -z "$(git status --porcelain)" ]; then | |
| echo "Working directory not clean, aborting" 1>&2 | |
| echo "${PWD}" |
This file contains hidden or 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 | |
| if [ $(git rev-parse --git-common-dir) != $(git rev-parse --git-dir) ]; then | |
| echo "Trying to detach from inside a worktree is not possible" 1>&2 | |
| echo "${PWD}" | |
| exit 1 | |
| fi | |
| branchname="${@}" | |
| if [ -z $branchname ]; then | |
| echo "No branch specified" 1>&2 |
This file contains hidden or 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 | |
| # sum, data count, minimum datum, maximum datum, mean and median of a single column of numeric data | |
| sort -n | awk ' | |
| BEGIN { | |
| c = 0; | |
| sum = 0; | |
| } | |
| $1 ~ /^[0-9]*(\.[0-9]*)?$/ { | |
| a[c++] = $1; | |
| sum += $1; |
This file contains hidden or 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_branch() { | |
| git symbolic-ref --short HEAD 2>/dev/null | |
| } | |
| git_branch() { | |
| # Tweak branch displayed info here | |
| branch=$(_git_branch) | |
| branch="${branch#*-*-*}" | |
| echo "${branch::12}" | |
| } | |
| git_status() { |