Skip to content

Instantly share code, notes, and snippets.

View theothermattm's full-sized avatar

Matt M. theothermattm

View GitHub Profile
@theothermattm
theothermattm / gist:ff8d689cf2405a504b28
Created September 16, 2014 17:15
Cut a section of lines using sed
sed -n 16224,16482p filename > newfile
@theothermattm
theothermattm / .tmux.conf
Last active August 29, 2015 14:05
My Tmux Conf file
#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
@theothermattm
theothermattm / .matt_profile
Last active September 30, 2015 12:36
My Bash/Zsh Common Dotfile
# 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 "$@" ;}
@theothermattm
theothermattm / visualvm-tomcat7.sh
Last active August 29, 2015 14:04
Get Java 7 visualvm working on remote Tomcat server
# 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
@theothermattm
theothermattm / macsetup.md
Last active August 29, 2015 13:57
Personal Mac Setup Steps
@theothermattm
theothermattm / private.xml
Created March 17, 2014 15:44
Karibiner (aka KeyRemap4MacBook) mapping file
<?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>
@theothermattm
theothermattm / .vimrc
Last active August 29, 2015 13:56
My .vimrc file
" 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
@theothermattm
theothermattm / gist:8863331
Created February 7, 2014 14:14
Effective SublimeText Vintage Configuration
// 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,
@theothermattm
theothermattm / gist:8827142
Created February 5, 2014 16:13
Recursively delete .svn folders
find . -name .svn | xargs rm -rf
@theothermattm
theothermattm / gist:8793406
Created February 3, 2014 22:06
List java home directories on OS X
/usr/libexec/java_home -V