A list of things I find myself always referring to, or I SHOULD always refer to 😄
The source of this is a Gist and is located here
| # attaches to the first running docker container containing the name passed | |
| # in as the first argument to the command | |
| # example: attachto projects | |
| function attachto () { | |
| echo "Attaching to first running docker container with name: $1 You might need to press ctrl+c to start entering commands..." | |
| docker attach $( docker ps | grep $1 | head -n 1 | cut -d' ' -f1) | |
| } |
A list of things I find myself always referring to, or I SHOULD always refer to 😄
The source of this is a Gist and is located here
| sed -n 16224,16482p filename > newfile |
| #Below configs from | |
| # https://wiki.archlinux.org/index.php/Tmux#Vim_friendly_configuration | |
| #Prefix is Ctrl-a | |
| set -g prefix C-a | |
| bind C-a send-prefix | |
| unbind C-b | |
| set -sg escape-time 1 | |
| set -g base-index 1 | |
| setw -g pane-base-index 1 |
| # for homebrew, make sure homebrew stuff is last in path | |
| export PATH=/usr/local/bin:/usr/local/sbin:~/bin:$PATH | |
| function mi() { mvim "$@" ;} | |
| # git | |
| alias gs='clear; git status' | |
| alias sstatus='clear; svn status' | |
| function gadd() { git add "$@" ;} |
| # Tomcat setup | |
| # add the following to the JVM_OPTS for the given tomcat instance | |
| VISUAL_VM_SETTINGS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.port=8086 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Xverify:none" | |
| # note that on os x, some StackOverflow posts have discussed the need for an additiona "-Xshare:off" setting. | |
| # To run jstatd | |
| # create a file called jstatd.all.policy | |
| # see http://docs.oracle.com/javase/7/docs/technotes/tools/share/jstatd.html |
| <?xml version="1.0"?> | |
| <!-- key modifier file for https://pqrs.org/macosx/keyremap4macbook/ --> | |
| <root> | |
| <appdef> | |
| <appname>MacVim</appname> | |
| <equal>org.vim.MacVim</equal> | |
| </appdef> | |
| <appdef> | |
| <appname>Iterm2</appname> |
| " A lot of this comes from | |
| " https://github.com/thoughtbot/dotfiles/blob/master/vimrc | |
| " Use Vim settings, rather then Vi settings (much better!). | |
| " This must be first, because it changes other options as a side effect. | |
| set nocompatible | |
| "filetype off | |
| filetype plugin indent on |
| // in default settings | |
| { | |
| // make sure this happens so vintage mode is enabled | |
| "ignored_packages": [] | |
| } | |
| // in user settings | |
| { | |
| // start in command mode instead of edit mode | |
| "vintage_start_in_command_mode": true, |