Skip to content

Instantly share code, notes, and snippets.

View electricjesus's full-sized avatar
🐅

Seth Malaki electricjesus

🐅
View GitHub Profile
@electricjesus
electricjesus / doubledecode-htmlent.py
Created March 13, 2012 17:13 — forked from litchfield/doubledecode.py
Double decode utf8 and cp1252
#!/usr/bin/env python
"""
modded doubledecode.py
Seth Malaki (seth d-o-t malaki a-t gmail d-o-t com)
mainly this modification aims to replace special characters with html entities instead.
Test status: todo/untested.
@electricjesus
electricjesus / elasticsearch.rake
Created October 31, 2012 04:58 — forked from jarosan/elasticsearch.rake
Elasticsearch reindex task
# Run with: rake environment elasticsearch:reindex
# must have : tire, will_paginate
# added multiple classes to reindex
namespace :elasticsearch do
desc "re-index elasticsearch"
task :reindex => :environment do
[Place, Time] # <--- CONFIGURE HERE: Provided that you have classes called 'Place and Time which have the necessary Tire callbacks

This is an example of how to write bdd style tests for brunch.io projects and the required setup