Assuming you are sitting on that commit
git reset --hard HEAD~1
Or
#Rosetta Code | |
for x in range(1, 101): | |
print ''.join(['' if x%3 else 'fizz', '' if x%5 else 'buzz']) or x | |
#!/bin/bash | |
TPY=${TM_PYTHON:-python} | |
esc () { | |
STR="$1" ruby <<"RUBY" | |
str = ENV['STR'] | |
str = str.gsub(/'/, "'\\\\''") | |
str = str.gsub(/[\\"]/, '\\\\\\0') | |
print "'#{str}'" | |
RUBY |
# Show git branch in bash prompt | |
__git_ps1 () | |
{ | |
local b="$(git symbolic-ref HEAD 2>/dev/null)"; | |
if [ -n "$b" ]; then | |
printf " (%s)" "${b##refs/heads/}"; | |
fi | |
} | |
alias la='ls -A' | |
alias ll='ls -l' |
#!/bin/sh | |
# | |
# This shell script passes all its arguments to the binary inside the | |
# MacVim.app application bundle. If you make links to this script as view, | |
# gvim, etc., then it will peek at the name used to call it and set options | |
# appropriately. | |
# | |
# Based on a script by Wout Mertens and suggestions from Laurent Bihanic. This | |
# version is the fault of Benji Fisher, 16 May 2005 (with modifications by Nico | |
# Weber and Bjorn Winckler, Aug 13 2007). |
# bash prompt | |
if [ -n "$SSH_CONNECTION" ] ; then | |
export PS1="\[\033[G\]\[\033[0;32m\]\u@\h\[\033[0;32m\] \w\$(__git_ps1) \$\[\033[00m\] " | |
else | |
if [ "$USER" != "baopham" ] ; then | |
export PS1="\[\033[G\]\[\033[0;32m\]\u \w\$(__git_ps1) \$\[\033[00m\] " | |
else | |
export PS1="\[\033[G\]\[\033[0;32m\]\w\$(__git_ps1) \$\[\033[00m\] " | |
fi | |
fi |
# | |
# bash_completion - programmable completion functions for bash 3.2+ | |
# | |
# Copyright © 2006-2008, Ian Macdonald <[email protected]> | |
# © 2009-2011, Bash Completion Maintainers | |
# <[email protected]> | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2, or (at your option) |
#!bash | |
# | |
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
# GistID: 2304197 | |
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs) | |
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 | |
# Enable subpixel font rendering on non-Apple LCDs | |
defaults write NSGlobalDomain AppleFontSmoothing -int 2 | |
# Enable the 2D Dock | |
defaults write com.apple.dock no-glass -bool true |