Skip to content

Instantly share code, notes, and snippets.

View lorn's full-sized avatar
🏠
Working from home

Lindolfo Rodrigues lorn

🏠
Working from home
View GitHub Profile
#!/bin/sh
#
# Use ipfw to throttle bandwidth.
# usage:
# ./throttle.sh # Throttle at default (60KB/s)
# ./throttle.sh 5 # Throttle at custom speed (5KB/s)
# ./throttle.sh off # Turn throttling off
# flush rules
ipfw del pipe 1
@lorn
lorn / 0_reuse_code.js
Created October 9, 2013 21:37
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@lorn
lorn / transcript.txt
Created March 13, 2013 22:39 — forked from defunkt/gist:6443
Chris Wanstrath keynote transcript
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.
@lorn
lorn / gist:4771534
Created February 12, 2013 17:28
Perl test at dotcloud
Using http://blogs.perl.org/users/phillip_smith/2011/08/dotcloud-loves-catalyst-apps-up-and-running-in-10-minutes-perl-in-the-cloud-part-iii.html
Results: http://myapp-lorn.dotcloud.com/
:)
@lorn
lorn / sites
Last active December 12, 2015 12:19
Sites to follow
http://rdegges.com/
http://usesthis.com
http://zachholman.com
http://blog.lancamentosnetflix.com.br
http://papodehomem.com.br
http://highscalability.com
http://matt.might.net
http://www.rubyinside.com
http://planetrubyonrails.com
http://www.railstips.org
@lorn
lorn / oracle.pl
Created November 28, 2012 19:19
Script perl para Oracle
#!/usr/bin/perl
use strict;
use warnings;
use DBD::Oracle qw(:ora_session_modes);
### Variaveis e conexao ao Oracle.
my $oracle_hostname = $ARGV[0];
my $oracle_database = $ARGV[1];
my $oracle_port = $ARGV[2];
my $oracle_username = 'SYS';
@lorn
lorn / video_drm.md
Created November 27, 2012 16:44
Video drm uncrackable from G+

Asher Langton Yesterday 6:41 AM (edited) - Public I bought a digital video download today that required a video player from Leaping Brain. As usual, the proprietary player wasn't great and to transfer it to my iPhone I'd need another proprietary player. Ugh. But I browsed around and found that the video had been downloaded into a hidden directory as a bunch of .mov files. Great, except none of the files would play.

It turned out the actual player, launched from their compiled app, was a Python wrapper around some VLC libraries. Nothing funny going on, as far as I could tell, but when I tried to launch the player directly, nothing happened. The compiled app was modifying the .mov files right before they were loaded into the player, and then reverting the file on disk. According to http://leapingbrain.com/mod-machine/faq/:

"We apply our BrainTrust™ proprietary video encryption to your movies before we upload them to our servers. If someone ever was able to gain access to your content, the files would be us

@lorn
lorn / Vagrantfile
Last active October 9, 2018 06:55
Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |vb|
vb.name = "app.intranet"
vb.customize [ 'modifyvm', :id, '--memory', '512' ]
vb.customize [ 'modifyvm', :id, '--cpus', '1' ]
end
@lorn
lorn / escalas.md
Created August 25, 2012 20:08
Music stuff

C - (D)#

C D E F G A B

Triade - C E G

D - (E)#

D F F# G A B C#

Triade - D F# A

E - (F#)

E F# G# A B C# D#

@lorn
lorn / Vagrantfile.rb
Created August 7, 2012 21:09
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.box = "ubuntu_precise"
config.vm.network :hostonly, "192.168.0.10"
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "site.pp"