Skip to content

Instantly share code, notes, and snippets.

Avatar

Guillaume Coré fridim

View GitHub Profile
View gist:270839
module Sharezilla
module Config
nickname = "nickname"
end
end
View gist:270841
module Myapp
module Config
nickname = "nickname"
end
end
View checkmyplaces.rb
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|
View gist:430880
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
View ballarat.csv.sql
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 ,
View .irbrc
%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
View .vimrc
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
View .vimrc
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
View library.rb
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
View main.rb
def score(r)
return 0 if r.nil?
weight = {
:name => 1,
:street_number => 1,
:street_name => 1,
:suburb => 1,
:zero => 0
You can’t perform that action at this time.