Skip to content

Instantly share code, notes, and snippets.

@ccopsey
ccopsey / hosts.deny
Last active Oct 29, 2015
IP addresses that I automatically ban based upon hacking attempts
View hosts.deny
ALL: 1.23.70.98
ALL: 1.30.20.148
ALL: 1.55.133.37
ALL: 1.85.62.39
ALL: 1.93.129.142
ALL: 1.189.209.194
ALL: 1.202.248.68
ALL: 1.214.119.227
ALL: 1.214.119.230
ALL: 1.219.80.189
@ccopsey
ccopsey / gist:9866a0bcb0b39ade04fe
Created Jan 3, 2015
Rename master branch on GitHub
View gist:9866a0bcb0b39ade04fe
git branch -m master newname
git push origin newname
# Change "Default Branch" in settings/options in GitHub
git push origin :master
@ccopsey
ccopsey / gist:559cb601ee61c22cd549
Created Jan 3, 2015
Rollback git repository to specific commit
View gist:559cb601ee61c22cd549
git reset --hard <old-commit-id>
git push -f
@ccopsey
ccopsey / gist:6335536
Last active Dec 21, 2015
Mac OSX filesystem uses Normalization-Form-Decomposition (NFD) for composite unicode characters. By default Git expects Normalization-Form-Composition (NFC). To make Git play nice with OSX, use the following command:
View gist:6335536
git config --global core.precomposeunicode true
@ccopsey
ccopsey / install.sh
Created Mar 28, 2011
Eclipse UpdateSite Mirroring and Batch Install
View install.sh
function execute {
echo $@
$@
echo
}
arch="linux-gtk-x86_64"
date=`date +%Y%m%d`
eclipseRootDirectory="/home/chris/eclipse"
@ccopsey
ccopsey / linux.bash_profile
Created Mar 28, 2011
Terminal Resource Files
View linux.bash_profile
export PS1="\[\e[0;35m\]\!\[\e[m\]:\[\e[0;36m\]\u\[\e[m\]@\[\e[0;31m\]\h\[\e[m\]:\[\e[0;32m\]\w\[\e[m\]> "
alias cp="cp -i"
alias mv="mv -i"
alias rm="rm -i"
alias g="grep"
alias h="history"
alias l="ls -hltrp --color"