Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby18
require 'rubygems'
require 'hpricot'
require 'open-uri'
require 'cgi'
require 'pp'
require 'ostruct'
require 'optparse'
#!/usr/bin/env ruby
require 'fileutils'
VOLSTORE = File.expand_path('~/.volume')
CHANNEL = 'vmix0-outvol'
MAX_VOLUME = 25
def osd_percentage(perc)
fork {
#!/bin/sh
# Description: Startup script for nginx webserver on Debian. Place in /etc/init.d and
# run 'sudo update-rc.d nginx defaults', or use the appropriate command on your
# distro.
#
# Author: Ryan Norbauer <ryan.norbauer@gmail.com>
# Modified: Geoffrey Grosenbach http://topfunky.com
#
#!/usr/bin/env ruby
require 'optparse'
require 'rubygems'
require 'id3lib'
Version = '0.0.1'
options = []
$ cat monitrc.mustache monitrc.yml | mustace
user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
(1)
/ \
/ \
/ \
/ \
2 3
/|\ |
/ | \ v
4 5 6 8 ----------
| /|\ |
" for use with :Gist
" clipboard fix
let g:gist_clip_command = 'xclip -selection clipboard'
let g:gist_browser_command = 'firefox %URL% &'
#!/usr/bin/env ruby
# encoding: utf-8
#
# simple youtube2mplayer script
# opens mplayer with the specified youtube video
#
# http://gist.github.com/322914
require "open-uri"
require "json"
#!/usr/bin/env ruby
# encoding: utf-8
require 'socket'
require 'json'
require 'pp'
I3_SOCKET_PATH = "/tmp/i3-ipc.sock"
message = "i3-ipc" + [0,1].pack("LL")