This file contains 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
hdiutil attach /Applications/Install\ OS\ X\ Mavericks.app/Contents/SharedSupport/InstallESD.dmg | |
cd /tmp | |
hdiutil convert /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg -format UDRW -o /tmp/RWBase | |
hdiutil convert -format UDSP -o /tmp/sparseRWBase RWBase.dmg | |
rm /tmp/RWBase.dmg | |
hdiutil resize -size 6g /tmp/sparseRWBase.sparseimage | |
hdiutil attach -owners on /tmp/sparseRWBase.sparseimage -shadow | |
sudo rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages | |
sudo ditto /Volumes/OS\ X\ Install\ ESD/Packages /Volumes/OS\ X\ Base\ System/System/Installation/Packages | |
hdiutil eject /Volumes/OS\ X\ Install\ ESD/ |
This file contains 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
# Based on https://www.atlassian.com/git/tutorials/dotfiles | |
git init --bare $HOME/.dotfiles | |
alias gd='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' | |
gd config --local status.showUntrackedFiles no | |
echo "alias gd='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" >> $HOME/.zshrc |
This file contains 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
{ | |
"sass": "sass --style=compressed --load-path=node_modules/foundation-sites/scss/ --load-path=node_modules/slick-carousel/slick/ _assets/css/styles.scss _assets/css/styles.css", | |
"uglify": "uglifyjs node_modules/jquery/dist/jquery.js node_modules/dompurify/dist/purify.js node_modules/velocity-animate/velocity.js node_modules/velocity-ui-pack/velocity.ui.js node_modules/slick-carousel/slick/slick.js _assets/js/tinypubsub.js _assets/js/breakpoints.js _assets/js/parallax.js _assets/js/parallaxFG.js _assets/js/inview.js _assets/js/youtubeplayer.js _assets/js/main.js -o _assets/js/bundle.js" | |
} |
This file contains 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
#!/usr/bin/env python | |
"""A noddy fake smtp server.""" | |
import smtpd | |
import asyncore | |
class FakeSMTPServer(smtpd.SMTPServer): | |
"""A Fake smtp server""" | |
def __init__(*args, **kwargs): |
This file contains 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
<form class="ddg" name="x" action="//duckduckgo.com/"> | |
<input type="hidden" value="muffinresearch.co.uk" name="sites"></input> | |
<input type="hidden" value="1" name="kh"></input> | |
<input type="hidden" value="1" name="kn"></input> | |
<input type="hidden" value="1" name="kac"></input> | |
<input type="search" placeholder="Search" name="q"></input> | |
<button class="button" type="submit">GO</button> | |
</form> |
This file contains 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
[Plugin] | |
Loader=python | |
Module=screensaver | |
IAge=1 | |
Name=Screensaver | |
Description=Pause Rhythmbox when the GNOME screensaver is activated | |
Authors=Jannik Heller <scrawl@baseoftrash.de> | |
Copyright=Copyright 2009 Jannik Heller | |
Website=http://scrawlshome.de/projects/screensaver |
This file contains 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
function MyConstructor(foo){ | |
if (!(this instanceof MyConstructor)){ | |
return new MyConstructor(foo); | |
} | |
this.foo = foo; | |
return this; | |
} | |
var instance1 = MyConstructor('foo1'); | |
var instance2 = new MyConstructor('foo2'); |
This file contains 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 clone https://android.googlesource.com/platform/system/extras | |
cd extras/ext4_utils | |
git checkout android-4.1.1_r1 | |
gcc -o simg2img -lz sparse_crc32.c simg2img.c | |
ln -s ${PWD}/simg2img ~/bin/simg2img | |
# Last step make sure ~/bin is in your $PATH. |
This file contains 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
mkdir ~/android-tools/ | |
cd ~/android-tools/ | |
wget https://android.googlesource.com/platform/system/core/+archive/master.tar.gz | |
tar -xzf master.tar.gz | |
cd libmincrypt | |
gcc -c *.c -I../include | |
ar rcs libmincrypt.a *.o | |
cd ../mkbootimg | |
gcc mkbootimg.c -o mkbootimg -I../include ../libmincrypt/libmincrypt.a |
This file contains 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
# Backup /etc/exports | |
sudo cp /etc/exports{,.bck} | |
# Append a link onto /etc/exports to configure nfs | |
echo '"'$(mkt root)'"' -alldirs -mapall=$(id -u $USER):$(id -g $USER) $(boot2docker ip) | sudo tee -a /etc/exports | |
sudo /sbin/nfsd restart | |
# Next let's unmount the old mount, start nfs and mount the nfs share. | |
boot2docker ssh "sudo umount $(mkt root)" | |
boot2docker ssh "sudo /usr/local/etc/init.d/nfs-client start" | |
boot2docker ssh "sudo mount $(boot2docker config | grep HostIP | cut -d'"' -f2):$(mkt root) $(mkt root) -o rw,async,noatime,rsize=32768,wsize=32768,proto=tcp" |
NewerOlder