Skip to content

Instantly share code, notes, and snippets.

@rcillo
rcillo / attach-eni.py
Last active May 30, 2019
This gist contains code that attaches an ENI to a running EC2 instance and configures the network accordingly
View attach-eni.py
# -*- 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
@rcillo
rcillo / good-to-great-notes.org
Last active Aug 29, 2015
Good to Great notes
View good-to-great-notes.org

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

View rails_internationalization.md

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.

View go_channel.ex
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
View gist:8447647
defmodule Fibonacci do
def f(0), do: 1
def f(1), do: 1
def f(n), do: f(n - 1) + f(n - 2)
end
View 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