Skip to content

Instantly share code, notes, and snippets.

View javierg's full-sized avatar

Javier Guerra javierg

View GitHub Profile
@javierg
javierg / current-rules
Created May 21, 2012 20:51 — forked from EnriqueVidal/current-rules
rubytij.org config
# Generated by iptables-save v1.4.10 on Sun Apr 22 03:00:29 2012
*filter
:INPUT DROP [59:1664]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [49:5928]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 11 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 4 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 3 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 22 -j ACCEPT
@javierg
javierg / fines-comunidad-ruby-tijuana.md
Created April 17, 2012 17:58
fines-comunidad-ruby-tijuana
  1. Sin fines de lucro
  2. Moderación abierta. Administrador sólo quita el spam
  3. Compartir código bajo una cuenta de organización de Github
  4. El grupo es una democracia
  5. Cuando la democracia no es suficiente (empate etc), entra la meritocracia
  6. Comete errores (quien no los comete no aprende)
  7. Pide ayuda
  8. Diviértete, quien no disfruta lo que hace, lo hace mal...
@javierg
javierg / commit-msg
Created September 26, 2011 18:50 — forked from remi/commit-msg
Git commit message spell check hook (kind of a proof of concept, but still usable)
#!/usr/bin/env ruby
# 1. Install hunspell
# $ brew install hunspell
# 2. Download a dictionary and install it in a path listed by `hunspell -D`
# $ open http://wiki.services.openoffice.org/wiki/Dictionaries
# 3. Move this file into your repository
# $ mv commit-msg /path/to/repo/.git/hooks
#!/bin/bash
##
## .git/hooks/post-merge
##
## Runs all special post-merge hooks
##
this_dir="$(dirname "$(test -L "$0" && readlink "$0" || echo "$0")")"
"$this_dir/require_signoff"

Chapter 2

Hours in a year (assuming is not a leap year)

hours_per_year = 365*24
puts hours_per_year

Minutes in a decade

minutes_per_decade = hours_per_year1060