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 ruby | |
require 'base64' | |
require 'open-uri' | |
# file or url | |
def get_css(src) | |
if src.start_with? 'http' | |
src = src.gsub('|', '%7C') | |
STDERR.puts "# GET #{src}" | |
# simulate modern browser to get woff |
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
from requests.models import Response | |
class fixedjson(object): | |
def __init__(self, func): | |
self.func = func | |
def __get__(self, inst, cls): | |
result = self.func(inst) | |
class proxy(type(result)): |
# =================================================================== | |
# Builds PHP as an Apache module (Apache profile needed) | |
[buildout] | |
extends = | |
apache.cfg | |
mysql.cfg | |
# Buildout parts | |
parts += | |
png-build |
localhost:~$ ssh example.com | |
ubuntu@example.com:~$ | |
... ooh, I could really do with a port forwarding to something on here ... | |
Type ENTER TILDE CAPITAL-C | |
ssh> | |
Secret SSH shell! | |
ssh> -L8080:localhost:8080 |
eventsource | |
go-eventsource | |
client/client |
ffmpeg -r 24 -i sequence/%d.png -i audio.aif -g 120 -level 216 -profile 0 -qmax 42 -qmin 10 -rc_buf_aggressivity 0.95 -vb 2M video.webm |
(ns tetris.core | |
(:import (java.awt Color Dimension BorderLayout) | |
(javax.swing JPanel JFrame JOptionPane JButton JLabel) | |
(java.awt.event KeyListener)) | |
(:use clojure.contrib.import-static deflayout.core | |
clojure.contrib.swing-utils) | |
(:gen-class)) | |
(import-static java.awt.event.KeyEvent VK_LEFT VK_RIGHT VK_DOWN VK_UP VK_SPACE) |
import objc | |
import AddressBook as ab | |
import pprint as pp | |
def pythonize(objc_obj): | |
if isinstance(objc_obj, objc.pyobjc_unicode): | |
return unicode(objc_obj) | |
elif isinstance(objc_obj, ab.NSDate): | |
return objc_obj.description() |