Skip to content

Instantly share code, notes, and snippets.

@rcillo
rcillo / delicious_mates.py
Created September 4, 2012 13:49 — forked from jashmenn/delicious_mates.py
delicious_mates.py
#!/usr/bin/env python
# encoding: utf-8
"""
delicious_mates.py
http://www.aiplayground.org/artikel/delicious-mates/
"""
import sys, math, re, time, base64, urllib2
from urlparse import urlparse
from getpass import getpass
defmodule Fibonacci do
def f(0), do: 1
def f(1), do: 1
def f(n), do: f(n - 1) + f(n - 2)
end
defmodule GoChannel do
def make do
spawn(&GoChannel.server/0)
end
def write(channel, val) do
send(channel, { :write, val})
end
def read(channel) do
@rcillo
rcillo / rails_internationalization.md
Last active August 29, 2015 14:18
Internationalization

Internationalization

In order to setup Rails applications locales on a per request basis, we ought to get such information in a Restful way. That means to always include the desired locale in the URL in order to correctly share context among users through simple links.

That said, Rails internationalization guideline already provides a complete list of options from which we have to choose one. In this document I aim to explain the rationale behind the decision.

@rcillo
rcillo / good-to-great-notes.org
Last active August 29, 2015 14:21
Good to Great notes

Personal notes

lots of important things might be common between good and great. To be good is not easy

too many analogies: toture, Einstein, hedghog, athletes, air traffic

Fanatically, God-given, inate??? wtf? It seems like a cult

Chapter 1 - Good is the enemy of great

@rcillo
rcillo / attach-eni.py
Last active May 30, 2019 15:13
This gist contains code that attaches an ENI to a running EC2 instance and configures the network accordingly
# -*- coding: utf-8 -*-\
"""
The MIT License (MIT)
Copyright (c) 2015 Zalando SE
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights