Skip to content

Instantly share code, notes, and snippets.

View jnstq's full-sized avatar

Jon Stenqvist jnstq

  • Equipe AB
  • Helsingborg, Sweden
View GitHub Profile
@jnstq
jnstq / gist:830ec59937ec81de3ed9
Last active August 29, 2015 14:01
Lunchr.io dishes feed format. Lunchr will request the feed at 10:00 every workday.
[ {
"name" : "Bara Rock",
"lat": "",
"lng": "",
"url": "",
"address": "",
"zipcode": "",
"city": "Helsingborg",
"dishes" : [
{
@jnstq
jnstq / gist:41771
Created December 30, 2008 22:03 — forked from peterc/gist:33337
# SUPER DARING APP TEMPLATE 1.0
# By Peter Cooper
# Link to local copy of edge rails
inside('vendor') { run 'ln -s ~/dev/rails/rails rails' }
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"
require 'rubygems'
require 'knock_knock'
require 'hpricot'
Bubble::KnockKnock::Connection.instance.connect('email','password', 'cp')
xml = Bubble::KnockKnock::Request.get('http://www.google.com/m8/feeds/contacts/username%40gmail.com/full', 'alt' => 'json')
doc = Hpricot::XML(xml)
(doc/:entry).each do |raw_item|
name = raw_item.at('title').inner_text
function authme {
ssh $1 'cat >>.ssh/authorized_keys' <~/.ssh/id_dsa.pub
}
class Penalty < ActiveRecord::Base
end
class PenaltiesController < Application
def index
end
def create
end
end
Signal.trap("CHLD") do
puts "Child proccses terminated"
end
filename, size, frames, timecode, = "", 0, 0, ""
run_command = "dvgrab -noavc -showstatus testfilm 2>&1"
pipe = nil
threads = []
threads << Thread.new do
Found AV/C device with GUID 0x006037004e545301
Capture Started
"dvgrab-002.dv": 61.80 MiB 450 frames timecode 02:19:44.06 date 2067.02.15 22:26:2525
"dvgrab-002.dv": 89.40 MiB 651 frames timecode 02:19:52.07 date 2067.02.15 22:26:2525
Capture Stopped
require 'rubygems'
require 'activesupport'
require 'ostruct'
module FireGrabber
class Recorder
class_inheritable_hash :configuration
self.configuration = {}
def self.configure
def parse(dvgrab_output)
if dvgrab_output =~ /"([.\w\/]*)":\s+(.*)\s+MiB\s+(\d+)\s+frames\s+timecode\s+(.*)\s+date/
@filename, @size, @frames, @timecode = $1, $2, $3, $4
end
end
Capture Stopped
Error: no DV