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
noremap <leader>m :!markdown < % > /tmp/%.html; open file:///tmp/%.html<CR> |
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
echo 'foo' | sudo tee -a bar |
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
sudo update-alternatives --set editor /usr/bin/vim.basic |
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/bash | |
if [ $OSTYPE = 'linux-gnu' ]; then | |
if [ -f /etc/debian_version ]; then | |
DIST=`cat /etc/lsb-release | grep '^DISTRIB_ID' | awk -F= '{ print $2 }'` | |
echo "Debian Stuff" | |
elif [ -f /etc/redhat-release ]; then | |
DIST=`cat /etc/redhat-release |sed s/\ release.*//` | |
echo "Redhat Stuff" | |
fi |
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
DIRECTORY=$(cd `dirname $0` && 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
git branch --set-upstream master remotes/origin/master |
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
# http://linuxcommando.blogspot.com/2008/10/how-to-disable-ssh-host-key-checking.html | |
sed -i 3d ~/.ssh/known_hosts | |
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no [email protected] | |
#Host 192.168.0.* | |
# StrictHostKeyChecking no | |
# UserKnownHostsFile=/dev/null |
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
# Automagic agent forwarding in remote screen sessions | |
# | |
# From http://superuser.com/questions/180148/how-do-you-get-screen-to-automatically-connect-to-the-current-ssh-agent-when-re-a | |
# In ~/.ssh/rc | |
#!/bin/bash | |
if test "$SSH_AUTH_SOCK" ; then | |
ln -sfv $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock | |
fi |
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
2>null # silence stderr | |
># # silence stdout | |
2>&1 # redirect stderr to stdout | |
1>&2 # redirect stdout to stderr | |
1><2 # swap stdout and stderr |
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 push origin mybranch:remotebranch |