Skip to content

Instantly share code, notes, and snippets.

👨‍💻
Available for freelancing

Joaquín Vicente wacko

👨‍💻
Available for freelancing
Block or report user

Report or block wacko

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wacko
wacko / imagemagick_install.sh
Created Oct 30, 2014
Steps for installing ImageMagick-6.8.9 on Debian
View imagemagick_install.sh
sudo apt-get update
sudo apt-get install build-essential checkinstall libx11-dev libxext-dev zlib1g-dev libpng12-dev libjpeg-dev libfreetype6-dev libxml2-dev
sudo apt-get install imagemagick
wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar -xzvf ImageMagick.tar.gz
cd ImageMagick-6.8.9-9
./configure
make
sudo make install
@wacko
wacko / wtf_patch.rb
Created Feb 14, 2014
Rails freezes when trying to generate a broken route
View wtf_patch.rb
# Related: https://github.com/rails/rails/issues/1525#issuecomment-1782439
# Rails freezes when
module ActionDispatch
module Routing
class RouteSet
def inspect
# The solution is... to throw a random exception (to halt the normal flow, I think)
wtf!
end
end
View exception.rb
#! /usr/bin/env ruby
def (_) Exception end
def ಠ益ಠლ; end
raise (ಠ益ಠლ), "WTF, dude!"
@wacko
wacko / clock
Last active Jan 3, 2016
Emoji animations that fit in a tweet
View clock
ruby -e 'z=0x1F551;->(c,&b){loop{c.each(&b)}}.(11.times.map{|i|[z+i].pack("U")}){|m|print "#{"\b"*3}#{m} ";sleep 0.1}'
@wacko
wacko / fractals
Last active Jan 3, 2016
Ruby scripts that print a fractal in less than 140 chars
View fractals
# Fractal #1
ruby -e "36.times{|l|puts (0..99).map{|n|x=y=i=0;(x,y,i=x*x-y*y+n/38.0-1.9,2*x*y+l/14.0-1.2,i+1)until(x*x+y*y>4||i>78);(32+i).chr}*''}"
# Fractal #2
ruby -e "32.times{|l|puts (0..78).map{|n|x=y=i=0;(x,y,i=x*x-y*y+n/38.0-1.5,2*x*y+l/14.0-1,i+1)until(x*x+y*y>4||i>78);(32+i).chr}*''}"
# Fractal #3
ruby -e "57.times{|l|puts (-20..135).map{|n|x=y=i=0;(x,y,i=x*x-y*y+n/38.0-1.5,2*x*y+l/14.0-2,i+1)until(x*x+y*y>4||i>78);(32+i).chr}*''}"
View juju
sudo apt-get -y install python-software-properties
sudo add-apt-repository ppa:juju/pkgs
sudo apt-get update
sudo apt-get -y install lxc apt-cacher-ng libzookeeper-java zookeeper juju git
# create a SSH authorized/public key
ssh-keygen -t rsa
# set AWS credentials
export AWS_ACCESS_KEY_ID=XXXXXXXX
@wacko
wacko / gist:5577187
Last active Mar 3, 2020
SSH between Mac OS X host and Virtual Box guest
View gist:5577187

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0

@wacko
wacko / carousel.html
Created May 2, 2013
Twitter Bootstrap - Fade in / fade out on carousel
View carousel.html
@wacko
wacko / delicious_shortcuts.js
Created Mar 4, 2013
Delicious: Shortcut for adding a new link ("a") seems to be missing
View delicious_shortcuts.js
// source: https://delicious.com/js/app.js
key("/",this.focusSearch),
key("1",this.showDiscover),
key("2",this.showNetwork),
key("3",this.showRemember)},
//...
key("k",this.showPreviousDetailPane),
key("up",this.showPreviousDetailPane),
key("j",this.showNextDetailPane),
key("down",this.showNextDetailPane),
@wacko
wacko / traceroute
Last active Dec 12, 2015
traceroute 216.81.59.173
View traceroute
$ traceroute 216.81.59.173
traceroute to 216.81.59.173 (216.81.59.173), 64 hops max, 52 byte packets
1 * * *
2 * * *
3 * * *
4 * * *
5 133-165-89-200.fibertel.com.ar (200.89.165.133) 66.947 ms
189-165-89-200.fibertel.com.ar (200.89.165.189) 64.246 ms
157-165-89-200.fibertel.com.ar (200.89.165.157) 64.231 ms
You can’t perform that action at this time.