Skip to content

Instantly share code, notes, and snippets.

View gabrielstuff's full-sized avatar

Gabriel gabrielstuff

View GitHub Profile
@gabrielstuff
gabrielstuff / sequence_install.sh
Created January 4, 2012 22:35
Installing afp + avahi + osx = replace SAMBA
apt-get update
apt-get upgrade
apt-get install libcrack2-dev libssl-dev
apt-get install avahi-daemon
apt-get install netatalk
vim /etc/netatalk/AppleVolumes.default
<path_to_share> <sharename> allow:<username> cnidscheme:cdb options:usedots,upriv
@gabrielstuff
gabrielstuff / rsync.sh
Created January 5, 2012 00:35
rsync over different port SSH
rsync -avz -e "ssh -p $portNumber" user@remoteip:/path/to/files/ /local/path/
@gabrielstuff
gabrielstuff / chunk-poll.js
Created January 13, 2012 01:27
polling with sencha
setInterval("MyApp.stores.myStore.sync()", 3000);
@gabrielstuff
gabrielstuff / happy_coding.sh
Created January 13, 2012 02:36
Code happily with a cow and some fortune
#download fortune : http://download.cnet.com/fortune/3000-20416_4-8558.html
if brew is installed :
brew install fortune
#download cowsay : http://linux.softpedia.com/get/Utilities/cowsay-34561.shtml
brew install cowsay
# Install them
#fire up vim !
vim ~/.profile
#add a cow say a fortune
@gabrielstuff
gabrielstuff / applisten.sh
Created January 19, 2012 09:39
List application and port on Unix
lsof -i -n | egrep 'COMMAND|LISTEN'
@gabrielstuff
gabrielstuff / resize.js
Created January 19, 2012 15:11
Resize Safari window/Chrome to whatever size you need
self.moveTo(0,0);
//iphone
self.resizeTo(360,480);
//iphone retina
self.resizeTo(960,640);
@gabrielstuff
gabrielstuff / each_with_index.js
Created March 3, 2012 16:00 — forked from burin/each_with_index.coffee
each_with_index handlebars helper, adds an {{index}} prop accessible from within the block
// {{#each_with_index records}}
// <li class="legend_item{{index}}"><span></span>{{Name}}</li>
// {{/each_with_index}}
Handlebars.registerHelper("each_with_index", function(array, fn) {
var total = array.length;
var buffer = "";
for (var i = 0, j = array.length; i < j; i++) {
var item = array[i];
@gabrielstuff
gabrielstuff / .bash_profile
Created March 9, 2012 11:40
Bash profile startup
echo Hello !
export PS1="\[\033[0;32m\]\u\[\033[0m\]@\[\033[0;34m\]\h\[\033[1;36m\]\w\[\0[0m\]: "
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig/:/Users/igab/gtk/inst/lib/pkgconfig/
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/Users/gabrielstuff/bin:$PATH"
test -r /sw/bin/init.sh && . /sw/bin/init.sh
cd /tmp
if [ -h mysql.sock ]
then
echo mysql is ready !
else
@gabrielstuff
gabrielstuff / haskell-package.log
Created March 15, 2012 23:49
brew install -v haskell-platform
Ven mar 16 00:33:24 ~/Sites/exquise/wp-content/themes/exquiseV2 [master] $ brew install -v haskell-platform
==> Downloading http://lambda.haskell.org/platform/download/2011.4.0.0/haskell-platform-2011.4.0.0.tar.gz
File already downloaded in /Users/gabrielstuff/Library/Caches/Homebrew
/usr/bin/tar xf /Users/gabrielstuff/Library/Caches/Homebrew/haskell-platform-2011.4.0.0.tar.gz
==> ./configure --prefix=/usr/local/Cellar/haskell-platform/2011.4.0.0 --enable-unsupported-ghc-version
./configure --prefix=/usr/local/Cellar/haskell-platform/2011.4.0.0 --enable-unsupported-ghc-version
**************************************************
*
* Haskell Platform Source Installer
*
@gabrielstuff
gabrielstuff / hack.sh
Created March 31, 2012 23:52 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#