Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env escript
%% -*- erlang -*-
%%! -smp enable -sname convert_binary_ring -mnesia debug verbose
main([RingFile, OutFile]) ->
try
{ok, Binary} = file:read_file(RingFile),
Ring = binary_to_term(Binary),
try
file:write_file(OutFile, io_lib:format("~p.~n", [Ring])),
@bitops
bitops / commits.txt
Created October 9, 2012 18:38
writing good commit messages
Also, please write good git commit messages. A good commit message
looks like this:
Header line: explaining the commit in one line
Body of commit message is a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc etc.
The body of the commit message can be several paragraphs, and
@bitops
bitops / tmux.conf
Created September 27, 2012 17:08
Sebastian's ~/.tmux.conf
# Use Ctrl+O as bind key
unbind C-b
unbind C-o
set -g prefix C-o
# Use vi key bindings to navigate
set-window-option -g mode-keys vi
# Use Ctrl+O, O to switch back and forth between panes
bind-key C-o last-window
@dmpeters
dmpeters / gist:3195360
Created July 29, 2012 00:04
homebrew issues with git and pkg-config after installing mountain lion osx 10.8
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
_reencode_string in libgit.a(utf8.o)
_reencode_string in libgit.a(utf8.o)
"_iconv_close", referenced from:
"_iconv_close", referenced from:
_reencode_string in libgit.a(utf8.o)
Undefined symbols for architecture x86_64:
@zolrath
zolrath / gist:2305333
Created April 4, 2012 20:27
tmux status line from wemux example.

For a tmux status line as seen in the example image for the wemux project: wemux

The session on the left in the example screen shot uses a patched font from the vim-powerline project. Inconsolata-dz, you beautiful creature.

To duplicate the left status line add the following lines to your ~/tmux.conf

set -g status-left-length 32
set -g status-right-length 150
@mdoroudi
mdoroudi / gist:1646085
Created January 20, 2012 08:11
Installing the ruby-debug-base19-0.11.26.gem on Ruby 1.9.3-p0, Mac OS X Lion 10.7.2 and Xcode 4.2.1
Hi,
I followed the instruction from http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug and all the comments under it. But I still have problems with installing ruby-debug-base19. I have tried all the following and I still get this error.
gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-dir=/Users/mdoroudi/.rvm/rubies/ruby-1.9.3-p0/
gem install ruby-debug-base19-0.11.26.gem -- --with-ruby- include=/Users/mdoroudi/.rvm/rubies/ruby-1.9.3-p0/include/ruby-1.9.1/ruby-1.9.3-p0/
gem install ruby-debug-base19-0.11.26.gem -- --with-ruby- include=/Users/mdoroudi/.rvm/rubies/ruby-1.9.3-p0/
gem install ruby-debug-base19-0.11.26.gem -- --with-ruby- include=/Users/mdoroudi/.rvm/src/ruby-1.9.3-p0/
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug-base19-0.11.26.gem: