Skip to content

Instantly share code, notes, and snippets.

" 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>
else
map ,e :e <C-R>=expand("%:p:h") . "\\" <CR>
endif
" 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
CmdUtils.CreateCommand(
{
name: "rails",
takes: {"function": noun_arb_text},
icon: "http://ruby-doc.org/favicon.ico",
homepage: "http://jackndempsey.blogspot.com",
author: {name: "Jack Dempsey", email: "jack.dempsey@gmail.com"},
license: "MPL,GPL",
description: "Search rails functions documentation",
help: "Select a rails function",
require 'test/unit'
class ShouldTest < Test::Unit::TestCase
def self.should(behave, &block)
mname = "test_should_#{behave}"
if block
define_method mname, &block
else
define_method mname do
>> require 'map'
=> true
>> m = Std::Map.new
=> #<Std::Map:0xb78aaa04>
>> m[0] = 1
=> 1
>> m.each { |x| p x }
[0, 1]
=> #<Std::Map:0xb78aaa04>
>> require 'sample_enum'
CmdUtils.CreateCommand(
{
name: "erlang",
takes: {"function": noun_arb_text},
icon: "http://erlang.org/favicon.ico",
author: {name: "Jason Roelofs", email: "jameskilton@gmail.com"},
license: "MPL,GPL",
description: "Open erlang documentation for a given module",
help: "Select an erlang module",
execute: function(directObject)
-module(echo_server).
-export([handle_event/3, handle_sync_event/4, init/1,
code_change/4, handle_info/3,
terminate/3]).
-export([start/0, start_fsm/1, loop/2]).
-define(TCP_OPTIONS, [binary, {packet, 0}, {active, false}, {reuseaddr, true}]).
>> require 'benchmark'
=> true
>> Benchmark.measure { 1000000.times { a = /peoplel/}}.real
=> 0.199249029159546
>> Benchmark.measure { 1000000.times { a = Regexp.new("peoplel")}}.real
=> 4.74100685119629
>>
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()
function is_git_svn {
git config --get svn-remote.svn.url > /dev/null
if [ $? == 0 ]; then
echo "(svn) "
else
echo ""
fi
}