Skip to content

Instantly share code, notes, and snippets.

@premist
premist / ffmpeg2.rb
Created June 17, 2016 11:52 — forked from victusfate/ffmpeg2.rb
homebrew formula for ffmpeg2
require 'formula'
class Ffmpeg2 < Formula
homepage 'http://ffmpeg.org/'
url 'http://ffmpeg.org/releases/ffmpeg-2.0.tar.bz2'
sha1 '7583c25cd41b6b4741819b977672627abb772f7e'
head 'git://git.videolan.org/ffmpeg.git'
option "without-xvid", "Disable Xvid MPEG-4 video encoder"
@premist
premist / readFileCache.js
Created September 7, 2012 08:38
readFileCache.js: fs.readFile LRU(Least Recently Used) Cache for Node.js
// readFileCache.js
// fs.readFile LRU(Least Recently Used) Cache for Node.js
// This module will cache file data automatically on memory
// in order to serve the data faster for repetitive requests.
// Usage:
// var cache = require('./readFileCache.js');
// cache.readFile('./index.html', 'utf-8', function(err, data) {
// response.write(data);
@premist
premist / gist:3235577
Created August 2, 2012 08:56 — forked from danparsons/gist:3195652
How to stream the London 2012 Olympics

How to stream the London 2012 Olympics

There have been several HOWTOs posted regarding streaming the 2012 Olympics using HTTP / SOCKS proxies via SSH and other similar methods. None of these actually work using the latest Flash on Mountain Lion (with Firefox, Chrome or Safari). Additionally, the third-party streaming sites don't provide BBC's amazing interface, which lets you quickly skip to individual competitors and events. However, setting up an OpenVPN server does work, with some tweaks. You'll get the exact same UX that people in England receive.

@premist
premist / service
Created April 20, 2012 02:34 — forked from bmeck/service
init.d script
#!/bin/bash
#
# initd-example Node init.d
#
# chkconfig: 345 80 20
# description: Node init.d example
# processname: node
# pidfile: /var/run/initd-example.pid
# logfile: /var/log/initd-example.log
#