This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Exit if not run with sudo | |
if [[ $UID != 0 ]] | |
then | |
echo "This command requires sudo" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ $1 == 'start' ]; then | |
ipfw pipe 1 config bw 30Kbit/s delay 350ms | |
ipfw add 1 pipe 1 src-port 80 | |
ipfw add 2 pipe 1 dst-port 80 | |
elif [ $1 == 'stop' ]; then | |
sudo ipfw delete 1 | |
sudo ipfw delete 2 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getScript(src, callback) { | |
var script = document.createElement('script'); | |
script.src = src + '?nc=' + new Date().getTime(); | |
var done = false; | |
script.onload = script.onreadystatechange = function () { | |
if (!done && (!this.readyState | |
|| this.readyState === 'loaded' | |
|| this.readyState === 'complete') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import subprocess | |
""" | |
Checked staged JavaScript files for jshint errors | |
""" | |
def jshint(): | |
errors = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
svin revert --recursive . && svn status | grep ^\? | awk '{print $2}' | xargs rm -rf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var jsdom = require('jsdom'); | |
var express = require('express'); | |
var app = express(); | |
app.get('/user/:username/timeline/', function (req, res) { | |
console.log('Get timeline for: ' + req.params.username); | |
jsdom.env( | |
'http://www.twitter.com/' + req.params.username, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Underscore Template AMD Compiler | |
Ryan Blunden | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Django Admin Theme | |
Ryan Blunden | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "admin/base.html" %} | |
{% load i18n %} | |
{# Customize the branding in the login form #} | |
{% block title %}{{ title }} | {% trans 'Site Name Admin' %}{% endblock %} | |
{% block extrastyle %} | |
<link rel="stylesheet" href="{{ STATIC_URL }}css/django-admin-theme.css" media="screen"/> | |
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p ~/Library/Developer/Xcode/UserData/FontAndColorThemes && | |
cd ~/Library/Developer/Xcode/UserData/FontAndColorThemes && | |
curl -O https://raw.github.com/meap/Darcula-Xcode-Theme/master/Darcula.dvtcolortheme |