Skip to content

Instantly share code, notes, and snippets.

View oinak's full-sized avatar

Fernando Martínez oinak

View GitHub Profile
@oinak
oinak / facebook-contact-info-summary.rb
Created March 23, 2018 06:15 — forked from dylanmckay/facebook-contact-info-summary.rb
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It dumps all cell phone call + SMS message + MMS records, plus a summary of each.
#
# Place this script inside the extracted Facebook data download folder
# alongside the 'html' folder.
#
@oinak
oinak / Dockerfile
Last active June 26, 2022 00:47 — forked from anonymous/Dockerfile
Example docker config for rails develompent
FROM ruby:2.4
## In case of postgresql for heroku:
# RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" >> /etc/apt/sources.list.d/postgeresql.list \
# && wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
# && apt-get update \
# && apt-get update \
# && apt-get install -y --no-install-recommends \
# postgresql-client-9.6 pv ack-grep ccze unp htop vim \
# && rm -rf /var/lib/apt/lists/* \
@oinak
oinak / .bash_aliases
Created February 6, 2017 09:44 — forked from ro-fdm/.bash_aliases
Git desde inicio en nueva maquina
alias bash='bash --login'
alias ls='ls --color'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias t='tailf'
alias c='ccze -A'
alias ag='ack-grep'
alias g='git'
alias e='gvim '
@oinak
oinak / changes.md
Created November 23, 2012 23:28 — forked from funny-falcon/changes.md
Performace patch for ruby-1.9.3-p327 (debian notes)

Changes:

  • this version includes backport of Greg Price's patch for speedup startup http://bugs.ruby-lang.org/issues/7158 .

    ruby-core prefers his way to do thing, so that I abandon cached-lp and sorted-lf patches of mine.

  • this version integrates 'array as queue' patch, which improves performance when push/shift pattern is heavily used on Array.

    This patch is accepted into trunk for Ruby 2.0 and last possible bug is found by Yui Naruse. It is used in production* for a couple of months without issues even with this bug.

@oinak
oinak / versionable.rb
Created October 16, 2012 22:16 — forked from txus/versionable.rb
Mindfuck of the day: versionable Ruby objects
# Note, some syntax inspired from that persistent data structures library for Ruby, Hamster??
# Scroll to the bottom to see it in action.
module Versioned
def self.included(base)
base.class_eval do
def self.new(*args)
new_mutable(*args).freeze
end
@oinak
oinak / jazzfonica.rb
Created July 3, 2011 10:10 — forked from christos/jazzfonica.rb
jazzfonica
#!/usr/bin/env ruby
# jazzfonica.rb for Mac OS X
# Scans the visible networks for JAZZTEL_XXXX or WLAN_XXXX and calculates the password
# Ported from PHP example at http://kz.ath.cx/wlan/codigo.txt
# Download and execute with ruby (e.g. ruby jazzfonica.rb) from a Terminal
require 'digest/md5'
messages = []
unless !File.exists?('/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport')
# Dieta para verano:
- desayuno: galletas de fibra + café/infusión (en mi caso limonada casera)
- media mañana: fruta (1 ó 2 melocotones o 3 rodajas piña al natural o 2 rodajas de sandía)
- comida: verdura hervida, a la plancha, en conserva o ensalada a tutiplén. Filete de vaca, de pollo o pescado blanco a la plancha. Sin límite de cantidad, cébate!
- media tarde: fruta, como a media mañana
- cena: como la comida + un yogur desnatado o infusión.
- Recomendaciones ;)
- si no la tienes, compra una sartén antiadherente de verdad y límpiala justo después de usarla: podrás hacer cosas a la plancha sin usar aceite y podrás usar más de este para aliñar ensaladas y verduras
- si echas de menos las salsas, prueba a combinar especias, cebolla, ajo, limón... sirven para animar cualquier plato, por insulso que sea