Skip to content

Instantly share code, notes, and snippets.

View guillermo's full-sized avatar
😍
Processing request ...

Guillermo Álvarez guillermo

😍
Processing request ...
View GitHub Profile
@guillermo
guillermo / svg2pdf.bash
Created December 1, 2020 16:57 — forked from s417-lama/svg2pdf.bash
Reliable way to convert an SVG file to a PDF file using headless Chrome
#!/bin/bash
#
# Convert an SVG file to a PDF file by using headless Chrome.
#
if [ $# -ne 2 ]; then
echo "Usage: ./svg2pdf.bash input.svg output.pdf" 1>&2
exit 1
fi
@guillermo
guillermo / editor.sh
Last active December 15, 2015 14:59 — forked from ttscoff/editor.sh
#!/bin/bash
case $1 in
*_EDITMSG|*MERGE_MSG|*_TAGMSG )
/usr/local/bin/vim $1
;;
*.md|*.txt )
/usr/local/bin/mmdc $1
;;
* )
require "time"
party_time = Time.parse("5/04/2012 6:00:00 P.M.")
trap(:INT){puts ""}
loop do
seconds_left = party_time.to_i - Time.now.to_i
print "\rSeconds left to party: #{seconds_left}"
sleep(1)
end
@guillermo
guillermo / twitter_backup.rb
Created December 10, 2011 12:05 — forked from mort/twitter_backup.rb
Tweaking mort's fork of the Tweaking Guillermo's original script to add support for accounts with a huge amount of tweets ;), to use the new twitter api.
#!/usr/bin/env ruby
=begin
DESCRIPTION
This little program will save all tweets from a user timelime to files
~/.twitter_backup/tweets/tweet_id.yaml # Full yaml tweet
~/.twitter_backup/tweets/tweet_id.txt # Only tweet text
You can search your tweets with:
@guillermo
guillermo / learn_ruby_by_example.rb
Created September 27, 2010 17:20 — forked from raul/learn_ruby_by_example.rb
learn ruby with multi process
#!/usr/bin/env ruby
#
# This fork add support for running code in a forked process
#
# encoding: UTF-8
#
# LearnRubyByExample:
#
# Ruby is a highly expressive programming language.
# Testing software is an expressive way to communicate how it works.
@guillermo
guillermo / search.rb
Created September 22, 2010 17:50
Mini search logic
class Search < OpenStruct
def to_hash
@table
end
end
@guillermo
guillermo / build_ruby19.sh
Created February 18, 2009 19:21 — forked from postmodern/build_ruby19.sh
build_ruby19.sh With Curl insted wget
#!/bin/sh
mkdir -p /usr/local/src && cd /usr/local/src
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.bz2
tar -xjvf ruby-1.9.1-p0.tar.bz2
cd ruby-1.9.1-p0
./configure --prefix=/usr --program-suffix=19 --enable-shared
make && make install
@guillermo
guillermo / gist:20448
Created October 28, 2008 17:52 — forked from mort/gist:20341
78 char column with
Oferta de trabajo en Simplelógica http://simplelogica.net keywords: rails,
ruby, web, simplelogica, hacking Contacto: david@simplelogica.net Fecha:
28/10/2008
Hola,
en Simplelógica estamos buscando un/una desarrollador/desarrolladora en Rails
para trabajar con nosotros. No necesitamos superexpertos, sino gente que esté
entusiasmada por su experiencia con Rails hasta el momento y quiera continuar
aprendiendo y mejorando en un entorno bastante agradable, con proyectos