Skip to content

Instantly share code, notes, and snippets.

View aitor's full-sized avatar
👊
Working!

Aitor García Rey aitor

👊
Working!
View GitHub Profile
1. Entrar en vuestra web da alegría, sobre todo cuando uno pincha en la sección para conocer el equipo. ¿Tanto optimismo y alegría se respira en una tarea tan difícil como la de montar un negocio?
Gracias, nunca nos habían dicho que nuestra web transmitía optimismo y alegría. Aunque lo cierto es que empleamos un tercio de nuestra vida trabajando; y sería muy ingenuo suponer que un periodo de tiempo tan grande contenga únicamente momentos felices.
El hecho de que el balance de todos estos años deba ser positivo -y debe serlo- para tener un vida feliz, no debería evitar que aceptemos que es imposible que todo sea fantástico, siempre, en cada momento y en cada situación.
Respecto a lo difícil que es montar un negocio. Creemos que empezar un negocio es fácil. Extremadamente fácil para la mayor parte de sectores y personas. Puedes montarlo en la mayor parte de comunidades autónomas en pocos días, con poco dinero.
¿Es cómodo? No, tienes que patear oficinas y registrar papeleo. ¿Es agradable? No siempre, hay fun
@aitor
aitor / gist:2214391
Created March 27, 2012 09:35
Cómo **no** dar accesso a datos públicos

Recientemente OpenData Euskadi liberó datos relacionados con el transporte público. Información al respecto:

http://ecodiario.eleconomista.es/espana/noticias/3850101/03/12/El-Gobierno-vasco-libera-los-datos-de-transporte-publico-a-traves-de-Moveuskadi-y-Open-Data-Euskadi.html

Obviamente la iniciativa es bienintencionada, pero como en muchas otras implementaciones de datos públicos eso es lo mejor que se puede decir de ella.

Una lista rápida de WTFs sobre el proceso de acceso a los mismos:

  • Registro obligatorio para el uso -> MAL
@aitor
aitor / load_heroku_env.rb
Created February 4, 2012 18:25
Rails 3.x initializer for loading HEROKU envs in local environment
# Load heroku ENV variables in local development on Rails startup
#
# For a variable defined like this:
#
# heroku config:add S3_KEY='s3krit'
#
# This initializer will define a ENV["S3_KEY"] with a 's3krit' value in development environment.
# Be careful to not overwrite any variable by mistake.
# Potentially destructive.
@aitor
aitor / gist:1710365
Created January 31, 2012 12:57
Our role in a software-based civilization (temptative title)

What is to be a developer?

Coder, informatician, software artisan, digital craftsman, hacker… maybe we can't agree about the denomination of our work as we like to invent countless number of ways to call it but we don't -used to- have problems explaining what is its nature.

For that last 40 years we and the developers before us, have being struggling to discover how to make better, more flexible, more resilient software. But in all this time it was pretty clear that the product we were creating was made by lines of code, that the context for using it was that screen in front of us, the personal computer, and that the users of our work were very much other human beings. Even the biggest tipping point in the software industry -the creation of the Internet- to a large extent didn't change this.

Now look around you. Software is the mythological hydra turned digital, turned invisible, turned ubiquitous, turned anything and everything, anywhere and everywhere. The way software is constantly permeating through ou

29/11/11 13:18:11,000 kernel: HuaweiDataCardDriver start.
29/11/11 13:18:12,000 kernel: HuaweiDataCardActivateDriver: start()!HuaweiDataCardDriver::allocateResources start!HuaweiDataCardActivateDriver: activateDevice() start!HuaweiDataCardActivateDriver: start() - successfulHuaweiDataCardActivateDriver: start()!HuaweiDataCardDriver::allocateResources start!HuaweiDataCardActivateDriver: activateDevice() start!HuaweiDataCardActivateDriver::activateDevice. failed.
29/11/11 13:18:12,000 kernel: HuaweiDataCardActivateDriver::clearPipeStall - failed
29/11/11 13:18:13,000 kernel: HuaweiDataCardActivateDriver: activateDevice() start!HuaweiDataCardActivateDriver::activateDevice. failed.
29/11/11 13:18:13,000 kernel: HuaweiDataCardActivateDriver::clearPipeStall - failed
29/11/11 13:18:14,000 kernel: HuaweiDataCardActivateDriver: activateDevice() start!HuaweiDataCardActivateDriver::activateDevice. failed.
29/11/11 13:18:14,000 kernel: HuaweiDataCardActivateDriver::clearPipeStall - failed
29/11/11 13:18:15,000 kernel: Hu
@aitor
aitor / cloud_front.rb
Created October 24, 2011 15:54 — forked from glebm/cloud_front.rb
A module to invalidate cache on Amazon CloudFront
require 'openssl'
require 'net/http'
require 'net/https'
module CloudFront
extend self
def invalidate(path)
date = Time.now.utc
date = date.strftime("%a, %d %b %Y %H:%M:%S %Z")
# Because you know, db:pull is fucking slow...
function backup:pull () {
name=$(heroku info --raw | grep "^name=" | cut -d= -f2)
echo "Loading '$name' app's data in local database."
heroku pgbackups:capture --expire
curl -o latest.dump `heroku pgbackups:url`
pg_restore --verbose --clean --no-acl --no-owner -d $name latest.dump
rm -fr latest.dump
}
def copy(content)
return content if `which pbcopy`.strip == ''
IO.popen('pbcopy', 'r+') { |clip| clip.puts content }
content
end
@aitor
aitor / gist:1231604
Created September 21, 2011 08:48 — forked from tvandervossen/gist:1231476
Mobile Safari viewport sizes on iOS 4.3 and 5
iPad
1024 × 690 In landscape on iOS 4.3
1024 × 672 In landscape on iOS 5
768 × 946 In portrait on iOS 4.3
768 × 928 In portrait on iOS 5
1024 × 660 Always showing bookmarks bar in landscape on iOS 4.3
1024 × 644 Always showing bookmarks bar in landscape on iOS 5
768 × 916 Always showing bookmarks bar in portrait on iOS 4.3
@aitor
aitor / Example output.txt
Created July 11, 2011 12:47
google search by image
[aitor@banba:~/workshop/github/aitor/eikon 12:45:34] ruby eikon.rb
The image [http://www.ikbrunel.org.uk/userFiles/GreatBritainWeb.jpg] is used on the following urls:
#1 - Brunel's ss Great Britain - a great day out in Bristol: http://www.ssgreatbritain.org/
#2 - SS Great Britain - Wikipedia, the free encyclopedia: http://en.wikipedia.org/wiki/SS_Great_Britain
#3 - Visually similar images: /search?hl=en&tbs=simg:CAESVhpUCxCwjKcIGjgKNggBEhAyO6IBpALWAXFalgHHA8ICGiC7Z4CRSqBwRbPycayBw-pY1paEp0-Eh4efms4VtdVSZgwLEI6u_1ggaCgoICAESBKuhSWcM&q=ss+great+britain&tbm=isch&sa=X&ei=efAaTtW7EMSu8gPkhpwO&ved=0CC8Qsw4
#4 - MyBrunel.co.uk :: Great Britain :: © 2011: http://www.mybrunel.co.uk/ships/britain/index.php
#5 - SS (Steam Ship) Great Britain: http://www.crwflags.com/fotw/flags/gb~ssgb.html