Skip to content

Instantly share code, notes, and snippets.

View gist:6059
" Make ',e' (in normal mode) give a prompt for opening files
" in the same dir as the current buffer's file.
if has("unix")
map ,e :e <C-R>=expand("%:p:h") . "/" <CR>
map ,e :e <C-R>=expand("%:p:h") . "\\" <CR>
View gist:6061
" line/char info in lower right of screen
:set ruler
"Color scheme (use tab-completion to learn other options)
:colorscheme koehler
" syntax highlighting
:syntax on
"Share the system clipboard
View ruby-search.ubiquity-command.js
name: "rails",
takes: {"function": noun_arb_text},
icon: "",
homepage: "",
author: {name: "Jack Dempsey", email: ""},
license: "MPL,GPL",
description: "Search rails functions documentation",
help: "Select a rails function",
View gist:13965
require 'test/unit'
class ShouldTest < Test::Unit::TestCase
def self.should(behave, &block)
mname = "test_should_#{behave}"
if block
define_method mname, &block
define_method mname do
View gist:17242
>> require 'map'
=> true
>> m =
=> #<Std::Map:0xb78aaa04>
>> m[0] = 1
=> 1
>> m.each { |x| p x }
[0, 1]
=> #<Std::Map:0xb78aaa04>
>> require 'sample_enum'
View gist:18320
name: "erlang",
takes: {"function": noun_arb_text},
icon: "",
author: {name: "Jason Roelofs", email: ""},
license: "MPL,GPL",
description: "Open erlang documentation for a given module",
help: "Select an erlang module",
execute: function(directObject)
View gist:20798
-export([handle_event/3, handle_sync_event/4, init/1,
code_change/4, handle_info/3,
-export([start/0, start_fsm/1, loop/2]).
-define(TCP_OPTIONS, [binary, {packet, 0}, {active, false}, {reuseaddr, true}]).
View gist:27467
>> require 'benchmark'
=> true
>> Benchmark.measure { 1000000.times { a = /peoplel/}}.real
=> 0.199249029159546
>> Benchmark.measure { 1000000.times { a ="peoplel")}}.real
=> 4.74100685119629
View gist:30886
roelofs@trillian [method_properties]~/projects/rice $ make
Making all in rice
make[1]: Entering directory `/home/roelofs/projects/rice/rice'
make all-am
make[2]: Entering directory `/home/roelofs/projects/rice/rice'
g++ -DHAVE_CONFIG_H -I. -I/usr/lib/ruby/1.8/i686-linux -O2 -march=prescott -pipe -fno-strict-aliasing -fPIC -fPIC -I/usr/lib/ruby/1.8/i686-linux -MT Class.o -MD -MP -MF .deps/Class.Tpo -c -o Class.o Class.cpp
Module_impl.ipp: In member function 'Derived_T& Rice::Module_impl<Base_T, Derived_T>::define_method(Rice::Identifier, Func_T, const Rice::Method_Property&)':
Module_impl.ipp:147: error: there are no arguments to 'default_method_property' that depend on a template parameter, so a declaration of 'default_method_property' must be available
Module_impl.ipp:147: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
Module_impl.ipp: In member function 'Derived_T& Rice::Module_impl<Base_T, Derived_T>::public_visibility()
View gist:31971
function is_git_svn {
git config --get svn-remote.svn.url > /dev/null
if [ $? == 0 ]; then
echo "(svn) "
echo ""
You can’t perform that action at this time.