Skip to content

Instantly share code, notes, and snippets.

View tovbinm's full-sized avatar
⌨️
<typing sounds>

Matthew Tovbin tovbinm

⌨️
<typing sounds>
View GitHub Profile
@tovbinm
tovbinm / gist:2975609
Created June 22, 2012 22:47
Remove the “Last login” message from the Mac OS X Terminal
Remove:
touch .hushlogin
Get it back:
rm .hushlogin
@tovbinm
tovbinm / gist:2975579
Created June 22, 2012 22:37
Emacs from command line on Mac
If you want to easily run emacs from the command line on mac (and not open a new instance of emacs each time), put the following in your .bash_profile:
alias emacs="DYLD_LIBRARY_PATH=/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources:\$SDROOT/lib open -a /Applications/Emacs.app \"$@\""
And in your .emacs file:
(setq ns-pop-up-frames nil)
@tovbinm
tovbinm / gist:2975295
Created June 22, 2012 21:26
Tabbar for emacs
git clone https://github.com/dholm/tabbar /usr/local/share/emacs/site-lisp/tabbar
Add then:
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/tabbar")
(require 'tabbar)
(tabbar-mode t)
to ~/.emacs.d/lisp/my-emacs.el
@tovbinm
tovbinm / haproxy.cfg
Created May 30, 2012 01:02
HAProxy config for Riak
global
user haproxy
group haproxy
daemon
maxconn 2048
defaults
log global
option dontlognull
balance roundrobin
@tovbinm
tovbinm / gist:2598838
Created May 5, 2012 00:51
Stop iptables
#!/bin/sh
echo "Stopping firewall and allowing everyone..."
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
@tovbinm
tovbinm / Command line
Created May 4, 2012 21:39
Modify hosts file on Android device
adb remount
adb push ~/android.hosts /system/etc/hosts
@tovbinm
tovbinm / install_riak_with_homebrew.bash
Created May 2, 2012 21:43 — forked from tinomen/install_riak_with_homebrew.bash
riak needs erlang R13b04 and homebrew now defaults to R14
# first install erlang using the R13b04 formula
brew install https://github.com/mxcl/homebrew/raw/810d52f4a386ea9e2b837030120ffd69cad73722/Library/Formula/erlang.rb
# now you are free to install riak
brew install riak
@tovbinm
tovbinm / gist:2407992
Created April 17, 2012 18:24
Syntax highlighting in VIM
echo "syntax on" >> ~/.vimrc
@tovbinm
tovbinm / gist:2407636
Created April 17, 2012 17:28
Install s3cmd
wget -O s3c.zip http://goo.gl/skBTi && unzip s3c.zip && cd ./s3cmd-1.1.0-beta3 && python setup.py install && cd ../ && rm -rf ./s3c.zip ./s3cmd-1.1.0-beta3
@tovbinm
tovbinm / Linux
Created April 9, 2012 20:04
Increase ulimit
1.
# vim /etc/sysctl.conf
fs.file-max = 999999
net.ipv4.tcp_rmem = 4096 4096 16777216
net.ipv4.tcp_wmem = 4096 4096 16777216
net.ipv4.ip_local_port_range = 1024 65535
2.
# vim /etc/security/limits.conf
root - nofile 999999