by Asim Jalis, MetaProse.com
Create a file __main__.py
containing:
print "Hello world from Python"
Zip up the Python files (in this case just this one file) into app.zip
by typing:
<?php | |
/** | |
* Cast an object into a different class. | |
* | |
* Currently this only supports casting DOWN the inheritance chain, | |
* that is, an object may only be cast into a class if that class | |
* is a descendant of the object's current class. | |
* | |
* This is mostly to avoid potentially losing data by casting across | |
* incompatable classes. |
set $ssl off; | |
if ($scheme = https) { | |
set $ssl on; | |
} | |
proxy_set_header X-Forwarded-Ssl $ssl; |
by Asim Jalis, MetaProse.com
Create a file __main__.py
containing:
print "Hello world from Python"
Zip up the Python files (in this case just this one file) into app.zip
by typing:
class Color(object): | |
""" | |
utility to return ansi colored text. | |
""" | |
colors = { | |
'black': 30, | |
'red': 31, | |
'green': 32, | |
'yellow': 33, |
try | |
delay 15 -- adjust delay as needed | |
repeat 40000 times | |
try | |
tell application "Finder" to close every window | |
delay 0.09 -- adjust delay as needed | |
set theDigit to func(37) | |
on error | |
do shell script "killall Finder" | |
delay 10 -- adjust delay as needed |
# Turn off that annoying start up message | |
startup_message off | |
# Turn the even more annoying whole-screen-flash-on-tab-complete "feature" | |
vbell off | |
terminfo xterm-color hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l | |
term xterm-color | |
# Window list at the bottom. hostname, centered tabs and redmarked active windows: |
""" | |
A simple proxy server. Usage: | |
http://hostname:port/p/(URL to be proxied, minus protocol) | |
For example: | |
http://localhost:8080/p/www.google.com | |
""" |
/** | |
* Stop an iframe or HTML5 <video> from playing | |
* @param {Element} element The element that contains the video | |
*/ | |
var stopVideo = function ( element ) { | |
var iframe = element.querySelector( 'iframe'); | |
var video = element.querySelector( 'video' ); | |
if ( iframe ) { | |
var iframeSrc = iframe.src; | |
iframe.src = iframeSrc; |
"""" | |
The orignal author: Alexer / #python.fi | |
""" | |
import opcode | |
import dis | |
import sys | |
import multiprocessing |
#include "headers.h" | |
using namespace llvm; | |
using namespace std; | |
struct codegen { | |
enum insn_name { | |
ptr_increment, // > | |
ptr_decrement, // < | |
value_increment, // + |