Skip to content

Instantly share code, notes, and snippets.

@garlandkr
garlandkr / gist:166716
Created August 12, 2009 20:03
Just testing the forms
def test(value):
data = value
return data
if __name__ == "__main__":
test("something")
@garlandkr
garlandkr / gist:1186105
Created September 1, 2011 12:54
brew install transcode fails
==> Installing transcode dependency: sdl
==> Downloading http://www.libsdl.org/release/SDL-1.2.14.tar.gz
File already downloaded in /Users/garlandkr/Library/Caches/Homebrew
/usr/bin/tar xf /Users/garlandkr/Library/Caches/Homebrew/sdl-1.2.14.tar.gz
Warning: Building with LLVM, but this formula is reported to not work with LLVM:
(No specific reason was given)
We are continuing anyway so if the build succeeds, please open a ticket with
the following information: 2335-10.7. So
@garlandkr
garlandkr / gist:1186146
Created September 1, 2011 13:18
transcode fail with gcc
==> Installing transcode dependency: sdl
==> Downloading http://www.libsdl.org/release/SDL-1.2.14.tar.gz
File already downloaded in /Users/garlandkr/Library/Caches/Homebrew
/usr/bin/tar xf /Users/garlandkr/Library/Caches/Homebrew/sdl-1.2.14.tar.gz
Warning: Building with LLVM, but this formula is reported to not work with LLVM:
(No specific reason was given)
We are continuing anyway so if the build succeeds, please open a ticket with
the following information: 2335-10.7. So
> expresso@0.8.1 preinstall /home/ubuntu/expresso
> make deps/jscoverage/node-jscoverage
cd deps/jscoverage && ./configure && make && mv jscoverage node-jscoverage
/bin/sh: ./configure: not found
make: *** [deps/jscoverage/node-jscoverage] Error 127
npm info expresso@0.8.1 Failed to exec preinstall script
npm ERR! expresso@0.8.1 preinstall: `make deps/jscoverage/node-jscoverage`
npm ERR! `sh "-c" "make deps/jscoverage/node-jscoverage"` failed with 2
npm ERR!
node install connect
npm ERR! Unsupported
npm ERR! Not compatible with your version of node/npm: connect@1.6.1
npm ERR! Required: {"node":">= 0.4.1 < 0.5.0"}
npm ERR! Actual: {"npm":"1.0.27","node":"v0.5.5"}
npm ERR!
npm ERR! System Linux 2.6.35-30-virtual
npm ERR! command "node" "/home/ubuntu/local/bin/npm" "install" "connect"
npm ERR! cwd /home/ubuntu
npm ERR! node -v v0.5.5
@garlandkr
garlandkr / default.vcl
Created October 10, 2011 20:17
Varnish 3.0 syntax issue
sub vcl_error {
# CUSTOM
# -- Redirect the url when received from mobile device -- control transfered from vcl_request (see above)
if (obj.status == 750) {
set obj.http.Location = "http://mobile.blah.com";
set obj.status = 301;
return(deliver);
}
def cmdline(command):
""" Run commandline and return output """
process = subprocess.Popen(command, stdout=subprocess.PIPE).communicate()[0]
return process
import re
import sys
import argparse
import subprocess
import xml.etree.cElementTree as ET
def cmdline(command):
""" Run commandline and return output """
process = subprocess.Popen(command, stdout=subprocess.PIPE).communicate()[0]
#! /bin/sh
### BEGIN INIT INFO
# Provides: sickbeard
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Should-Start: $NetworkManager
# Should-Stop: $NetworkManager
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
root@silvermedia:/data/TV# ls -latr /home/silvermedia/.sickbeard/
total 1508
-rw-r--r-- 1 silvermedia www-data 9216 Feb 14 2012 sickbeard.db.v0
drwxr-xr-x 4 silvermedia www-data 4096 Feb 14 2012 cache
drwxr-xr-x 6 silvermedia www-data 4096 May 31 21:36 ..
-rw-r--r-- 1 silvermedia www-data 3964 Aug 25 09:53 config.ini
drwxr-xr-x 2 silvermedia www-data 4096 Aug 27 05:53 Logs
-rw-r--r-- 1 silvermedia www-data 1379328 Aug 27 09:53 sickbeard.db
-rw-r--r-- 1 silvermedia www-data 124928 Aug 27 11:54 cache.db
drwxr-xr-x 4 silvermedia www-data 4096 Aug 27 11:54 .