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 subprocess import Popen, PIPE | |
| import pty | |
| import os | |
| from select import select | |
| import sys | |
| import tty | |
| master, slave = pty.openpty() | |
| p = Popen(['python'], stdin=slave, stdout=PIPE, stderr=PIPE) | |
| pin = os.fdopen(master, 'w') |
| #!/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 | |
| [email protected]:~$ | |
| ... 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) |