Skip to content

Instantly share code, notes, and snippets.

View dennisreimann's full-sized avatar
still hungry. still foolish.

d11n dennisreimann

still hungry. still foolish.
View GitHub Profile
@dennisreimann
dennisreimann / plopp.rb
Created July 23, 2012 14:04 — forked from halfbyte/ploppconvert.rb
ploppcast conversion
#!/usr/bin/env ruby
# dependencies:
# - ffmpeg (`brew install ffmpeg`)
puts "Usage: plopp DIR" and exit unless dir = ARGV[0]
Dir["#{dir}/*.mov"].each do |input|
output = File.basename(input, '.mov')
system "ffmpeg -i '#{input}' -map 0:0 -vn -acodec copy #{output}-1.m4a -map 0:1 -vn -acodec copy #{output}-2.m4a"
@dennisreimann
dennisreimann / manifesto.md
Created April 23, 2012 18:42 — forked from hmans/whatever-manifesto.md
The Manifesto

THE MANIFESTO

Whatever it is that you choose to do, follow these two simple rules:

  1. Be friendly.
  2. Have fun.
# poor mans debugger
#
# if you want to know whats the value of an object just add .why?
# and you will see what it is and why your program behaves like it does.
#
Object.class_eval {def why?; raise "Because it is #{inspect}" ; end}
require 'net/http'
require 'uri'
# /api/v1/:format/new
# /api/v1/:format/gists/:user
# /api/v1/:format/:gist_id
res = Net::HTTP.post_form(URI.parse('http://gist.github.com/api/v1/xml/new'),
{ 'files[file1.ab]' => 'CONTNETS',
'files[file2.ab]' => 'contents' })