Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/usr/bin/env PYTHONIOENCODING=utf-8 python | |
# encoding: utf-8 | |
"""Git pre-commit hook which lints Python, JavaScript, SASS and CSS""" | |
from __future__ import absolute_import, print_function, unicode_literals | |
import os | |
import subprocess | |
import sys |
#!/bin/bash | |
set -e | |
usage(){ | |
echo "Error $errcode $errorcode at line ${BASH_LINENO[0]} while executing: $BASH_COMMAND" | |
exit $errorcode | |
} | |
trap usage ERR |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
<html> | |
<head> | |
<script> | |
function debug(string) { | |
var element = document.getElementById("debug"); | |
var p = document.createElement("p"); | |
p.appendChild(document.createTextNode(string)); | |
element.appendChild(p); | |
} |
if (typeof (AC) === "undefined") { | |
AC = {} | |
} | |
AC.Detector = { | |
getAgent: function () { | |
return navigator.userAgent.toLowerCase() | |
}, | |
isMac: function (c) { | |
var d = c || this.getAgent(); | |
return !!d.match(/mac/i) |
if (typeof (AC) === "undefined") { | |
AC = {} | |
} | |
AC.ImageReplacer = Class.create({ | |
_defaultOptions: { | |
listenToSwapView: true, | |
filenameRegex: /(.*)(\.[a-z]{3}($|#.*|\?.*))/i, | |
filenameInsert: "_☃x", | |
ignoreCheck: /(^http:\/\/movies\.apple\.com\/|\/105\/|\/global\/elements\/quicktime\/|_(([2-9]|[1-9][0-9]+)x|nohires)(\.[a-z]{3})($|#.*|\?.*))/i, | |
attribute: "data-hires", |
#!/bin/bash | |
#### This script is published by Philipp Klaus <[email protected]> | |
#### on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-automatic-ip-update-on-mac-os-x/> | |
#### It is originally by freese60 and modified by limemonkey. | |
#### Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0> | |
### Uncomment this line to debug the script: | |
#set -x |
var keyboard = function(window) { | |
var keyboard = window.keyboard || {}; | |
if (!('isPressed' in keyboard)) { | |
keyboard._keys = {}; | |
var handler = function(e, flag) { | |
var key = String.fromCharCode(e.which).toLowerCase(); | |
keyboard._keys[key] = flag; |