Skip to content

Instantly share code, notes, and snippets.

View eduardo's full-sized avatar

Edu Fernández eduardo

View GitHub Profile

Keybase proof

I hereby claim:

  • I am eduardo on github.
  • I am eduardo (https://keybase.io/eduardo) on keybase.
  • I have a public key whose fingerprint is BA68 842E C5E1 011A A12F AB06 E018 DD1A 3823 5A79

To claim this, I am signing this object:

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@eduardo
eduardo / cb.perl
Created July 24, 2015 22:03
Calling the Coinbase v2 API from Perl
#!/usr/bin/perl
use JSON;
use JSON::WebToken;
use Digest::SHA qw(hmac_sha256_hex);
my $apiKey= 'API_KEY';
my $apiSecret= 'API_SECRET';
my $urlcb = "https://api.coinbase.com/v2/orders";
my $url = URI->new($urlcb);
def ver
alt = (self.tipo == "Lateral" ? self.altura_lateral : self.altura)
if self.formato == "Flash"
html="<a href=\"#{self.url_destino.pon_http}\" title=\"#{self.texto}\">"
html+=" <object class=\"#{self.tipo == 'Superior' ? 'banner-top' : 'hotelrecomendado'}\">"
html+=" <param name=\"movie\" value=\"#{self.url_imagen.pon_http}\">"
html+=" <embed src=\"#{self.url_imagen.pon_http}\" width=\"#{self.anchura}\" height=\"#{alt}\">"
html+=" </embed>"
html+=" </object>"
html+="</a>"
$ dig soa juan.gg
; <<>> DiG 9.4.2-P2 <<>> soa juan.gg
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31209
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;juan.gg. IN SOA
$ sudo chef-solo -j /tmp/dna.json -l debug
INFO: Starting Chef Solo Run
DEBUG: Loading plugin os
DEBUG: Loading plugin ruby
DEBUG: Loading plugin languages
DEBUG: Loading plugin kernel
DEBUG: ---- Begin uname -s STDOUT ----
DEBUG: Linux
DEBUG: ---- End uname -s STDOUT ----
DEBUG: Ran (uname -s) returned 0
@eduardo
eduardo / httpdump
Created April 4, 2009 10:55 — forked from peterc/httpdump
# Monitor HTTP requests being made from your machine with a one-liner..
# Replace "en1" below with your network interface's name (usually en0 or en1)
sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*"
# OR.. to be able to use as "httpdump" from anywhere, drop this into ~/.bash_profile:
# (again replace "en1" with correct network interface name)
alias httpdump="sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*""
# All the above tested only on OS X.
# urlmonitor - print out the URLs requested system wide on the main network interface
# Accept a network interface name as an optional argument
iface = ARGV.first
# No interface specified? Try to guess which one is king..
unless iface
`ifconfig -l`.split.each do |iface|
next if iface =~ /^lo/
break if `ifconfig #{iface}` =~ /inet (0|1|2)/
require 'rubygems'
require 'sinatra'
require 'redis'
# To use, simply start your Redis server and boot this
# example app with:
# ruby example_note_keeping_app.rb
#
# Point your browser to http://localhost:4567 and enjoy!
#
@eduardo
eduardo / gist:106431
Created May 4, 2009 11:29 — forked from ezmobius/gist:105680
Deploy recipe for chef
# JSON
{
"applications": [
{
"foobar": {
"migration_command": "rake db:migrate",
"branch": "HEAD",
"deploy_action": "deploy",
"framework_env": "production",