Skip to content

Instantly share code, notes, and snippets.

Avatar

James O'Cull jocull

View GitHub Profile
View upload.py
#!/usr/local/bin/python
## {{{ http://code.activestate.com/recipes/273844/ (r3)
"""This demonstrates a minimal http upload cgi.
This allows a user to upload up to three files at once.
It is trivial to change the number of files uploaded.
This script has security risks. A user could attempt to fill
a disk partition with endless uploads.
If you have a system open to the public you would obviously want
to limit the size and number of files written to the disk.
@jocull
jocull / applicationHost.config
Last active Dec 17, 2015
ApplicationHost and Web configs for IIS 7.5 CGI HTTPS 30MB upload bug
View applicationHost.config
<?xml version="1.0" encoding="UTF-8"?>
<!--
IIS configuration sections.
For schema documentation, see
%windir%\system32\inetsrv\config\schema\IIS_schema.xml.
Please make a backup of this file before making any changes to it.
View gameboy.js
var windowingInitialized = !1,
inFullscreen = !1,
shortcutHashes = [
["PokemonRed", 25, "PokemonRed.gb"],
["PokemonBlue", 26, "PokemonBlue.gb"],
["PokemonYellow", 27, "PokemonYellow.gbc"],
["PokemonSilver", 28, "PokemonSilver.gbc"],
["PokemonGold", 29, "PokemonGold.gbc"],
["PokemonCrystal", 30, "PokemonCrystal.gbc"],
["PokemonPinball", 31, "PokemonPinball.gbc"],
View gist:1692030
while true do
print("Ore regen process, begun")
wait(5)
function onTouch(part)
if part.Name == "UnrefinedGold" then
part:remove()
print("Ore removed")
wait(1)
@jocull
jocull / gist:1088012
Created Jul 17, 2011
Cover art spread code
View gist:1088012
<?php
require_once('radio_functions.php');
@dbconnect();
ini_set('memory_limit', '512M');
$limit = 0;
if(isset($_GET["limit"]) && is_numeric($_GET["limit"]))
$limit = $_GET["limit"];
$until = 0;
@jocull
jocull / main.py
Created Dec 25, 2010
Fool's Spool - Brute Force Solution in Python
View main.py
import random
import copy
"""
Fool's spool number reels reference:
1 1 1 1
5 2 5 4
4 2 2 3
2 3 4 2
3 3 3 3
View QtTrayTime - output
Starting C:\Users\jocull\Documents\My Dropbox\Code\QT\QtTrayTime-build-desktop\debug\QtTrayTime.exe...
C:\Users\jocull\Documents\My Dropbox\Code\QT\QtTrayTime-build-desktop\debug\QtTrayTime.exe exited with code -1073741515