Skip to content

Instantly share code, notes, and snippets.

View anibali's full-sized avatar

Aiden Nibali anibali

View GitHub Profile
# Set prompt
PROMPT='%{$fg_bold[green]%}%n@%m%{$reset_color%}:%{$fg_bold[blue]%}%2~$(git_prompt_info)%{$reset_color%}%(!.#.$) '
# Set Git prompt decorations
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}‹"
ZSH_THEME_GIT_PROMPT_SUFFIX="›%{$reset_color%}"
0 => "00001", 1 => "00010", 2 => "00011", 3 => "00101",
4 => "00110", 5 => "00111", 6 => "01000", 7 => "01010",
8 => "01011", 9 => "01100", 10 => "01101", 11 => "01110",
12 => "01111", 13 => "10000", 14 => "10001", 15 => "10010",
16 => "10011", 17 => "10100", 18 => "10101", 19 => "10110",
20 => "10111", 21 => "11000", 22 => "11001", 23 => "11001",
24 => "11010", 25 => "11011", 26 => "11100", 27 => "11101",
28 => "11101", 29 => "11110", 30 => "11111", 31 => "11111"
import std.stdio: writeln, writefln;
import core.thread: Thread;
import core.sync.mutex: Mutex;
import core.atomic: atomicOp;
shared class SharedClass {
int x = 0;
Mutex mutex;
this() {
caller = "/usr/src/fog/Rakefile:52:in `<top (required)>'
/home/hedge/.rvm/gems/ruby-1.9.2-p0@fog/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
/home/hedge/.rvm/gems/ruby-1.9.2-p0@fog/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
/home/hedge/.rvm/gems/ruby-1.9.2-p0@fog/gems/rake-0.8.7/lib/rake.rb:2017:in `block in load_rakefile'
/home/hedge/.rvm/gems/ruby-1.9.2-p0@fog/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/hedge/.rvm/gems/ruby-1.9.2-p0@fog/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
/home/hedge/.rvm/gems/ruby-1.9.2-p0@fog/gems/rake-0.8.7/lib/rake.rb:2000:in `block in run'
/home/hedge/.rvm/gems/ruby-1.9.2-p0@fog/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/hedge/.rvm/gems/ruby-1.9.2-p0@fog/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/home/hedge/.rvm/gems/ruby-1.9.2-p0@fog/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
From c75fd5684970834d8e440deb899adba8a886e97b Mon Sep 17 00:00:00 2001
From: Aiden Nibali <dismaldenizen@gmail.com>
Date: Sun, 10 Oct 2010 11:09:56 +1100
Subject: [PATCH 1/2] added block support for Mash
---
lib/hashie/mash.rb | 6 ++++--
spec/hashie/mash_spec.rb | 14 ++++++++++++++
2 files changed, 18 insertions(+), 2 deletions(-)
@anibali
anibali / safe_navigation.rb
Created March 20, 2010 23:47
This code enables safe navigation via the function '_?'.
# This code enables safe navigation via the function '_?'. Examples of
# usage:
#
# "test"._?.no_such_method # NoMethodError
# " test "._?.strip #=> "test"
# nil._?.strip #=> nil
#
# In summary, `obj._?.some_method` can be thought of as doing
# `obj.nil? ? nil : obj.some_method`