Skip to content

Instantly share code, notes, and snippets.

"set t_Co=256
color molokai
let g:user_zen_expandabbr_key = '<c-e>'
noremap <Leader>s :update<CR>
let g:Tlist_Ctags_Cmd = '/usr/local/bin/ctags'
nnoremap <silent> <F8> :TlistToggle<CR>
au BufRead,BufNewFile /usr/local/etc/nginx/* set ft=nginx
let g:po_translator = 'Hugues Lismonde <hugues@epicagency.net>'
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Initialise les variables a None
# On ne peut pas utiliser une valeur numérique sinon les comparaisons seront
# incorrectes
min_val = None
max_val = None
@hlidotbe
hlidotbe / gist:824716
Created February 13, 2011 14:22
fort_boyard
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Initialisation allumettes et tour
n = 15
tour = 0
# Tant qu'il reste des allumettes
while n > 0:
# On initialise a -1
@hlidotbe
hlidotbe / gist:1222931
Created September 16, 2011 19:36
Stack trace of plugin load
% rails console
/Volumes/Data/Sites/rails/epocr/vendor/plugins/epoc_admin/lib/epoc_admin/application.rb:138:in `eval': Expected /Volumes/Data/Sites/rails/epocr/vendor/plugins/epoc_core/app/models/page_category.rb to define Page_category (LoadError)
from /Users/hli/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:181:in `block in const_missing'
from /Users/hli/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:179:in `each'
from /Users/hli/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:179:in `const_missing'
from /Users/hli/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:501:in `load_missing_constant'
from /Users/hli/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/d
@hlidotbe
hlidotbe / insert.rb
Created May 16, 2013 07:49
Closure Table in redis
def insert(item, parent, comment)
cid = @redis.incr 'comments_counter'
parent_path = @redis.zrangebyscore("asc:#{item}:#{parent}", "0", "+inf", with_scores: true) if parent
parent_path ||= []
@redis.multi do |multi|
multi.set "comments:#{cid}", {
data: comment,
item: item,
date: Time.now,
@hlidotbe
hlidotbe / vimrc
Created May 30, 2013 08:49
vimrc
""
"" Before plugins
""
set shell=/bin/bash
let mapleader = "`"
""
"" Basic Setup
""
@hlidotbe
hlidotbe / vim plugins
Created November 7, 2013 21:17
My (current) vim plugin list
AndrewRadev/linediff.vim (installed) 48KB /Users/hli/.microbe/AndrewRadev/linediff.vim
AndrewRadev/switch.vim (installed) 160KB /Users/hli/.microbe/AndrewRadev/switch.vim
SirVer/ultisnips (installed) 864KB /Users/hli/.microbe/SirVer/ultisnips
Yggdroot/indentLine (installed) 36KB /Users/hli/.microbe/Yggdroot/indentLine
altercation/vim-colors-solarized (installed) 92KB /Users/hli/.microbe/altercation/vim-colors-solarized
ap/vim-css-color (installed) 52KB /Users/hli/.microbe/ap/vim-css-color
cakebaker/scss-syntax.vim (installed) 40KB /Users/hli/.microbe/cakebaker/scss-syntax.vim
cespare/vim-toml (installed) 20KB /Users/hli/.microbe/cespare/vim-toml
corntrace/bufexplorer (installed) 72KB /Users/hli/.microbe/corntrace/bufexplorer
editorconfig/editorconfig-vim (installed) 388KB /Users/hli/.microbe/editorconfig/editorconfig-vim

Keybase proof

I hereby claim:

  • I am hlidotbe on github.
  • I am hlidotbe (https://keybase.io/hlidotbe) on keybase.
  • I have a public key whose fingerprint is 462D 4E91 3C4C 5ED5 E1D6 CEEB 88E7 564C B6BC F8EA

To claim this, I am signing this object: