Skip to content

Instantly share code, notes, and snippets.

@CPonty
CPonty / HTTPHelloWorld.py
Last active June 4, 2017 23:59
Minimal "Hello World" python server. A useful base for coding simple API tests.
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from sys import stdout
class RestHTTPRequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.end_headers()
self.wfile.write('Hello World!')
# optional: print a snippet of the request header to console
print str(self.headers).replace('\r\n', ' ')[:120]; stdout.flush()
This text is inside an iFrame.
<br>
The below video player is inside a <i>nested</i> iFrame.
<hr>
Subtitles start at 16 sec...
<br><br>
<iframe id="player1"
src="//player.vimeo.com/video/156413931?api=1&player_id=player1"
width="640px" height="480px"></iframe>
@CPonty
CPonty / pdflatex.makefile
Last active August 29, 2015 14:02
Simple pdflatex makefile for Mac OSX: Converts all image and .tex files into .pdf, then re-compiles the main document
# Simple pdflatex makefile for Mac OSX
# Converts all image and .tex files into .pdf, then re-compiles the main document
#
# Written by Chris Ponticello - christopher.ponticello@uqconnect.edu.au
# =====================================================================
IMG := $(wildcard *.bmp *.gif)
TEX := $(wildcard *.tex)
@CPonty
CPonty / pycharm-shortcuts.html
Last active August 29, 2015 14:01
JetBrains PyCharm - Custom Keyboard Shortcuts
<html>
<head>
<title>JetBrains PyCharm - Custom Keyboard Shortcuts</title>
</head>
<body>
<table>
<tr><td><b>cmd+shift+T</b></td>
<td>terminal</td></tr>
<tr><td><b>cmd+shift+G</b></td>