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
@lorn
lorn / gist:1275787
Created October 10, 2011 16:52
minicv
Lorn Rodrigues trabalha no iG com arquitetura de software, mas não gosta do papel de 'arquiteto' que não bota a mão na massa. Obcecado por alta disponibilidade e sistemas distribuidos, também gosta de testes de software e anda em busca do verdadeiro Deploy Continuo.
@lorn
lorn / starman.sh
Created December 7, 2011 23:23
Starman init.d script
#!/bin/bash
# starman - this script starts and stops the starman daemon
#
# chkconfig: - 85 15
# description: Starman
# processname: starman
# pidfile : /var/run/starman.pid
# www file: /var/www/myapp
@lorn
lorn / gist:1595115
Created January 11, 2012 15:12
Moose test
http://showmetheco.de/articles/2011/11/tdd-best-practices-in-perl.html
15:54 <@sartak> Test::Class is alright but check out Test::Routine too
15:54 <@mst> Lorn: I use Test::More
15:56 < Lorn> also, what is the address of Moose mailling list? moose.perl.org is out and I only find nntp list for moose
15:57 <@mst> [email protected]
15:57 < Lorn> Thanks
15:58 <@mst> Lorn: define "is out"
15:58 <@mst> Lorn: I got a redirect to moose.iinteractive.com
@lorn
lorn / ring.erl
Created February 10, 2012 17:45
Problem with ring in erlang :/
-module(ring).
-export([start/1,start_proc/2]).
start(Num) ->
start_proc(Num, self()).
start_proc(0,Pid) ->
Pid ! ok;
start_proc(Num, Pid) ->
NPid = spawn(ring, start_proc, [Num -1, Pid]),
@lorn
lorn / create_app_access_token.sh
Created April 25, 2012 18:48
Facebook API access_token
export APP_SECRET="02dfd454ff2b2ddcc49ede93e9ee338b"
export APP_ID="159018987471635"
export REDIRECT_URI="https://apps.facebook.com/sandbox_lorn/fb/connect/"
export CODE="AQB0z1SNyYEaF_6FjFkLs-vNSzOS64EjVRilEQX_R6ubYYqUnT-iIh75Am8IdknC274oEn2Q0j4ZfgpyBvrI_zQR0rPA-cxmaXOwcj16HS9DaBphcCdGRhxqrQ_wKp4UZ4fOpDSre3mlFbRBZKyjw-FOA7QG-_IA8gx9IQiCLwdLLhAF2spW62-U0ug7B52FSkqfw6RDVOVD8165kBqMSP9a#_=_"
echo -e "https://graph.facebook.com/oauth/access_token?client_id=$APP_ID&redirect_uri=$REDIRECT_URI&client_secret=$APP_SECRET&code=$CODE"
curl "https://graph.facebook.com/oauth/access_token?client_id=$APP_ID&redirect_uri=$REDIRECT_URI&client_secret=$APP_SECRET&code=$CODE"
@lorn
lorn / emacs.md
Last active October 4, 2015 12:47
emacs tips

janelas e buffers

ctrl x+b troca de buffer

ctrl x + ctrl b mostra buffer

ctrl x+o troca de janela

ctrl x+0 ( elimina a janela )

@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"
@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
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 / 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