start new:
tmux
start new with session name:
tmux new -s myname
| #!/bin/bash | |
| # Might as well ask for password up-front, right? | |
| sudo -v | |
| # Keep-alive: update existing sudo time stamp if set, otherwise do nothing. | |
| while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
| # Example: do stuff over the next 30+ mins that requires sudo here or there. | |
| function wait() { |
Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh
Easily checkout local copies of pull requests from remotes:
git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it outgit pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out| adb shell am | |
| usage: am [subcommand] [options] | |
| usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>] | |
| [--R COUNT] [-S] [--opengl-trace] <INTENT> | |
| am startservice <INTENT> | |
| am force-stop <PACKAGE> | |
| am kill <PACKAGE> | |
| am kill-all | |
| am broadcast <INTENT> | |
| am instrument [-r] [-e <NAME> <VALUE>] [-p <FILE>] [-w] |
| #!/bin/bash | |
| # | |
| # git-mv-with-history -- move/rename file or folder, with history. | |
| # | |
| # Moving a file in git doesn't track history, so the purpose of this | |
| # utility is best explained from the kernel wiki: | |
| # | |
| # Git has a rename command git mv, but that is just for convenience. | |
| # The effect is indistinguishable from removing the file and adding another | |
| # with different name and the same content. |
| #!/bin/bash | |
| # ps -eo pcpu,pid,user,args | sort -r -k1 | |
| PS="ps" | |
| VERSION="0.0.1" | |
| version () { | |
| echo $VERSION | |
| } |
This configuration is no longer updated
| #!/bin/bash | |
| iterations=10 | |
| # ----------------------------------------------------------------------------- | |
| # Create array of results | |
| declare -a results | |
| for i in $(seq 1 $iterations); |
| # Add to your .bashrc so the terminal starts in the project directory | |
| if [[ ${INTELLIJ} == "true" ]]; then | |
| cd ${OLDPWD} | |
| fi | |
| # Note that this works in IntelliJ 14, but not in 16. | |
| # Change the shell path in IntelliJ's Tools > Terminal to: | |
| # C:\cygwin64\bin\env INTELLIJ=true TERM=cygwin C:\cygwin64\bin\bash.exe --login -i |