Skip to content

Instantly share code, notes, and snippets.

View carlzulauf's full-sized avatar

Carl Zulauf carlzulauf

  • Unabridged Software
  • Denver, CO
View GitHub Profile
View mvimg_convert.rb
#!/usr/bin/env ruby
# Tool to convert Google motion JPGs (MVIMG) to MP4 video files.
# requires exiftool utility (ie: `apt install exiftool`)
# requires exiftool gem (ie: `gem install exiftool`)
require 'exiftool'
files = Dir['*.jpg']
View dynamical.rb
class Dynamical
def should_not_explode(&block)
5.times { |n| yield n }
define_method :works_fine do |&block|
5.times { |n| }
def also_works_fine(&block)
carlzulauf / restart_file_present.rb
Last active January 4, 2016 08:09 — forked from technicalpickles/restart_file_touched.rb
View restart_file_present.rb
module God
module Conditions
class RestartFilePresent < PollCondition
attr_reader :restart_file
def initialize
def restart_file=(file)
carlzulauf / gist:7670553
Last active December 29, 2015 12:29 — forked from kiba/gist:7670499
View gist:7670553
require "rubygems"
require "gems"
require "json"
require "retryable"
gems = []"gems", "r") do |f|
while (l = f.gets) do
gems << l.strip()
carlzulauf / gist:7526708
Last active December 28, 2015 16:09 — forked from Grundell/gist:7526597
View gist:7526708
#!/usr/bin/env ruby
require 'net/http'
require 'pp'
require 'benchmark'
Pleading =, :position ,:person, :party, :replik, :content, :point)
Point =, :title)
class DocumentParsing
POINT_REGEX = /^(?<no>\d+)\s+\§\s+(?<title>.+?)\s?$/
View thin init script
#!/usr/bin/env ruby
# quick and dirty thin init script
# path for thin
thin = "/home/someuser/.rvm/gems/ruby-1.8.7-p72@global/bin/thin"
config = "config/"
# which dir to run from
path = "/srv/thisapp"