Skip to content

Instantly share code, notes, and snippets.

View dbrack's full-sized avatar

Dominik Brack dbrack

View GitHub Profile
@dbrack
dbrack / change-java-version.sh
Last active March 13, 2016 15:36
Change JDK/Java Version on OS X
/usr/libexec/java_home -v 1.7.0_45 --exec javac -version # http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html
@dbrack
dbrack / ChangeTextEncoding
Created September 29, 2013 16:26
Script to change text encoding of files
find . -type f -name "*.java" | xargs vim +"argdo set bomb | set fileencoding=utf-8 | w"
find . -type f -name "*.java" | xargs vim +"argdo set fileencoding=utf-8 | w"
@dbrack
dbrack / RemoveKnownSSHHost.sh
Last active March 13, 2016 15:37
Remove a known hostname or ip from ~/.ssh/known_hosts
ssh-keygen -R hostnameORip
@dbrack
dbrack / FlushDNSMac
Created February 2, 2013 14:59
Flush DNS Mac OS X
Mac OS X 10.7 and 10.8
sudo killall -HUP mDNSResponder
Mac OS X 10.5 and 10.6
dscacheutil -flushcache
@dbrack
dbrack / CreateFiles.sh
Created October 31, 2012 16:53
This will create directories 00 till 13 with 100 files each 100 Mbytes in size. So 14 times 10 GB a total of 140 GBytes
for d in {00..13}
do
mkdir $d
for f in {000..100}
mkfile 100m $d/$f
done
@dbrack
dbrack / Recursive copy file.sh
Created January 11, 2013 12:46
Copy all files from sourcedir, including sub-dirs, to targetdir
find sourcedir -type f -print0 -exec cp {} targetdir \;
@dbrack
dbrack / CharPopUp.sh
Created January 23, 2013 07:21
DisableCharPopUpLionSublime
defaults write com.sublimetext.2 ApplePressAndHoldEnabled -bool false
@dbrack
dbrack / DisableCharPopUp.sh
Created January 23, 2013 07:24
DisableCharPopUp OS X Lion
defaults write -g ApplePressAndHoldEnabled -bool false
@dbrack
dbrack / keybase.md
Created April 6, 2016 12:03
Keybase identity

Keybase proof

I hereby claim:

  • I am dbrack on github.
  • I am dbr (https://keybase.io/dbr) on keybase.
  • I have a public key whose fingerprint is 69D6 2355 184E 214E 68E2 2BA4 577D 3E61 9394 E427

To claim this, I am signing this object:

@dbrack
dbrack / py-virtual-env.md
Last active May 16, 2016 18:32
Python virtual env OSX

#Python virtual env / Django OS X

Install virtualenv/virtualenvwrapper

pip install virtualenv

pip install virtualenvwrapper

Add the following to your .zshrc/bashrc