Skip to content

Instantly share code, notes, and snippets.

View svankie's full-sized avatar

Horacio Bertorello svankie

  • Buenos Aires, Argentina
View GitHub Profile
@svankie
svankie / gist:5233610
Created March 24, 2013 21:27
This script is not mine, it is Barry Allard intellectual property. I put it here to remember how awesome this is.
if [ -f ~/.zsh_nocorrect ]; then
while read -r COMMAND; do
alias $COMMAND="nocorrect $COMMAND"
done < ~/.zsh_nocorrect
fi
(* 2 2)
@svankie
svankie / gist:4017534
Created November 5, 2012 14:48
Coding Dojo @ Sumavisos
class Game
attr_accessor :winner
class Player
attr_accessor :current_score
def initialize(game)
@current_score = 0
@game = game
end
# index.py
from whoosh.fields import Schema, TEXT, ID
schema = Schema(
title=TEXT(stored=True),
description=TEXT(stored=True),
date=ID)
# index_builder.py
@svankie
svankie / whooshy
Created April 30, 2011 14:18
whoosh code
# index.py
import os
from whoosh.fields import Schema, TEXT as text, ID as id
from whoosh.index import create_in, open_dir
schema = Schema(
title=text(stored=True),
description=text(stored=True),