Skip to content

Instantly share code, notes, and snippets.

module Sharezilla
module Config
nickname = "nickname"
end
end
module Myapp
module Config
nickname = "nickname"
end
end
require 'yaml'
require 'rubygems'
require 'net/ssh'
require 'net/ssh/version'
places = YAML.load_file('places.yaml')
threads = []
places.each do |place|
threads << Thread.new(place) do |p|
let g:netrw_preview=1
""""""""""""""""""""""""""""""""""""""""""""" MAP
map <down> <ESC>:bn<RETURN>
map <left> <ESC>:NERDTreeToggle<RETURN>
map <right> <ESC>:Tlist<RETURN>
map <up> <ESC>:bp<RETURN>
map <F5> <Esc>:tabnew<CR>:read !svn diff<CR>:setf diff<CR>:w! /tmp/vim-diff-file.tmp<CR>
"set gfn=Inconsolata\ Medium\ 12
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ballarat]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ballarat]
GO
CREATE TABLE [dbo].[ballarat] (
[id] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[streetname] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[suburb] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[postcode] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[precinct] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
%w|rubygems wirble hirb utility_belt|.each do|lib|
begin
require lib
rescue LoadError => err
warn "Couldn't load an irb gem: #{err}"
end
end
# wirble (colors)
Wirble.init
if !has("gui_running")
"colorscheme candycode " yum candy
" I pretty much only like this scheme if I can use SIMBL with terminal
" colors:
" (http://www.culater.net/software/TerminalColors/TerminalColors.php)
" to change the really hard-to-read dark blue into a lighter shade.
" Or; Use iterm with Tango colors
colorscheme candy
"colorscheme rdark
let g:c_80_detect = 0
function! Change80Detect()
if g:c_80_detect == 1
match
let g:c_80_detect = 0
else
match ErrorMsg '\%>80v.\+'
let g:c_80_detect = 1
endif
endfunction
class Library
# Constructor. Initialize the good library according to the name given in parameter.
def initialize(library = '')
case library
when /sutherland/i
return Alexandria::Sutherland::Library.new
else
return Alexandria::Library.new
end
end
def score(r)
return 0 if r.nil?
weight = {
:name => 1,
:street_number => 1,
:street_name => 1,
:suburb => 1,
:zero => 0