Skip to content

Instantly share code, notes, and snippets.

View rodacato's full-sized avatar

Adrian Castillo rodacato

View GitHub Profile
=begin
Crowdint logical skills test.
=end
require 'rubygems'
require 'faster_csv'
@stats = {}
FasterCSV.foreach("events.csv", :col_sep =>"\t", :headers => :first_row) do |row|
@rodacato
rodacato / gist:3098837
Created July 12, 2012 15:22 — forked from Kimtaro/gist:1779371
Installing the wordnet gem on OSX or Ubunut, as of July 17 2012

Getting the wordnet gem, version 0.0.5, working is a little tricky at the moment. It's being rewritten but isn't released yet and the dbd gem is in a similar state.

These steps got it working for me on OS X Lion or Ubuntu 10.04 and MRI 1.8.7.

WordNet

Download WordNet from http://wordnet.princeton.edu/wordnet/download/current-version/

$ ./configure

@rodacato
rodacato / gist:3248673
Created August 3, 2012 15:30 — forked from jrochkind/gist:2161449
A Capistrano Rails Guide

A Capistrano Rails Guide

by Jonathan Rochkind, http://bibwild.wordpress.com

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".

@rodacato
rodacato / custom_atesta.sh
Created August 3, 2012 15:55
Compile custom atesta.gem
#!/bin/sh
echo -e '\n\n=============== Installing gem dependencies'
gem install jeweler --no-ri --no-rdoc
echo -e '\n\n=============== Cloning atesta fork'
git clone git://github.com/rodacato/atesta.git
echo -e '\n\n=============== Compiling atesta'
cd atesta
rake build
echo -e '\n\n=============== Installing forked atesta gem compiled'
cd pkg
@rodacato
rodacato / wurfl.c
Created August 7, 2012 17:30
Wurfl library
#include <stdio.h>
#include <string.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#include "wurfl.h"
xmlDoc *doc = NULL;
@rodacato
rodacato / default.vcl.pl
Created August 9, 2012 15:16 — forked from bmarini/default.vcl.pl
Varnish 3.0 config file
#
# This configurations is compiled automatically, do not edit.
# Last compilation ran at: <%= Time.now %>
#
# ==============================================================================
#
# This is a basic VCL configuration file for varnish. See the vcl(7)
# man page for details on VCL syntax and semantics.
#
# Default backend definition. Set this to point to your content
@rodacato
rodacato / README
Created October 31, 2012 22:00
Bulgarian translations
Please, edit the file below
and aware of:
* Dont remove placeholders like topic, resouce_name, etc...
* Dont add new lines
* Dont change the text identifier order
* Dont change the identation
@rodacato
rodacato / gemrc
Last active December 21, 2015 18:48
Install Ruby 1.9.3-p286 on Ubuntu 12.04 LTS
---
:verbose: true
gem: --no-ri --no-rdoc
:update_sources: true
:sources:
- http://rubygems.org
:backtrace: false
:bulk_threshold: 1000
:benchmark: false
@rodacato
rodacato / notes.txt
Created September 19, 2013 03:28
Things you need to know when install piwik on smartos
# Congifuration Files
vi /opt/local/etc/php.ini
vi /opt/local/etc/php-fpm.conf
vi /opt/local/etc/nginx/nginx.conf
# Restart services
svcadm [refresh|restart|enable|disable] nginx
svcadm [refresh|restart|enable|disable] php-fpm
@rodacato
rodacato / 0_reuse_code.js
Created January 7, 2014 03:39
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console