Skip to content

Instantly share code, notes, and snippets.

View statico's full-sized avatar

Ian Langworth ☠ statico

View GitHub Profile
@statico
statico / perforce-setup.sh
Last active August 29, 2015 14:08
perforce-setup.sh
#!/usr/bin/env bash
set -e
get_p4_url() {
local os=$(uname -s)
if [[ "$os" =~ Linux ]]; then
echo "http://cdist2.perforce.com/perforce/r14.2/bin.linux26x86_64/p4"
else
echo "http://cdist2.perforce.com/perforce/r14.2/bin.macosx105x86/p4"
#!/usr/bin/env python
#
# fancyoutput.py - quick functions to make script output pretty
#
# by Ian Langworth, 2010
#
# This code is in the public domain.
#
import sys
@statico
statico / settings_local.py
Created March 29, 2011 18:29
Additions to settings_local.py
# Change these to your libgeos paths!
GEOS_LIBRARY_PATH = '/opt/local/lib/libgeos_c.dylib'
GDAL_LIBRARY_PATH = '/opt/local/lib/libgdal.dylib'
GEOIP_LIBRARY_PATH = '/opt/local/lib/libGeoIP.dylib'
GEOIP_PATH = '/opt/local/share/GeoIP/'
# Disable compression if you need to debug JavaScript. You need to set both.
COMPRESS = False
ASSETS_DEBUG = True
@tbeseda
tbeseda / basic_auth_app.coffee
Created December 29, 2011 21:19
Basic HTTP Auth with Express for Node.js
express = require 'express'
app = express.createServer()
auth = express.basicAuth 'yourmom', 'p4ssw0rd'
app.get '/', auth, (req, res) ->
res.send your_super_secret_stuff
app.listen 3000, ->
console.log "Listening on #{port}"
@statico
statico / build.coffee
Created May 1, 2012 20:55 — forked from digitarald/build.coffee
Building require.js
requirejs = require('requirejs')
jspath = __dirname + '/views/scripts';
requirejs.optimize(
baseUrl: jspath
wrap:
start: ';(function(undefined) { "use strict";'
end: '}).call(this);'
@digitarald
digitarald / build.coffee
Created May 1, 2012 20:54
Building require.js
requirejs = require('requirejs')
jspath = __dirname + '/views/scripts';
requirejs.optimize(
baseUrl: jspath
wrap:
start: ';(function(undefined) { "use strict";'
end: '}).call(this);'
@statico
statico / movies.txt
Last active October 9, 2015 08:27
Ian's Remedial Movie-Watching List
IAN'S REMEDIAL MOVIE-WATCHING LIST
----------------------------------
12 Monkeys
Amélie
American Beauty
American History X
American Psycho
Babel
Beverly Hills Cop (first one)
@statico
statico / chromium_updater.sh
Created November 12, 2012 20:01
Automatically download Chromium nightly builds
#!/bin/bash
#
# Originally from "Automatically download Chromium nightly builds"
# http://top-frog.com/2010/05/29/automatically-download-chromium-nightly-builds/
LATEST=`curl -s http://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/LAST_CHANGE`
CURRENT=`defaults read /Applications/Chromium.app/Contents/Info SVNRevision 2>/dev/null`
PROCESSID=`ps ux | awk '/Chromium/ && !/awk/ {print $2}'`
if [[ $LATEST -eq $CURRENT ]]; then
@leafduo
leafduo / tsocks.rb
Last active December 11, 2015 03:39
require 'formula'
class Tsocks < Formula
# The original is http://tsocks.sourceforge.net/
# This GitHub repo is a maintained fork with OSX support
homepage 'http://github.com/pc/tsocks'
head 'https://github.com/pc/tsocks.git'
depends_on 'autoconf' => :build if MacOS.xcode_version.to_f >= 4.3
@fvbock
fvbock / gecko_highcharts.go
Created December 2, 2014 06:37
geckoboard highcharts payload
type HighChart struct {
Chart struct {
Style struct {
Color string `json:"color,omitempty"`
} `json:"style,omitempty"`
RenderTo string `json:"renderTo,omitempty"`
BackgroundColor string `json:"backgroundColor,omitempty"`
LineColor string `json:"lineColor,omitempty"`
PlotShadpw bool `json:"plotShadow,omitempty"`
} `json:"chart,omitempty"`