Skip to content

Instantly share code, notes, and snippets.

@TurplePurtle
TurplePurtle / eyegen.html
Created October 7, 2012 01:39
Eye Generator
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Eye</title>
<style>
html, body { background-color: #333; color: #eee; margin: 0; padding: 0; }
canvas { background-color: #000; color: #fff; display: block; margin: 16px auto 0; outline: 1px solid #555;}
</style>
</head>
@TurplePurtle
TurplePurtle / mylittlestreambot.rb
Created August 24, 2012 17:19
My Little StreamLogger Bot
require 'snoo'
bot = Snoo::Client.new 'http://www.reddit.com', 'r/mylittlestreamlog bot'
puts 'Logging in...'
bot.log_in(ARGV[0], ARGV[1])
def is_stream(item)
data = item['data']
if /(?<!main)stream/i.match(data['title'])
@TurplePurtle
TurplePurtle / api.lua
Created August 24, 2012 00:52
Basic reddit API functions
--[[
Currently implemented functions are:
login(user, passwd)
me(auth)
submit(title, isSelf, content, subreddit, auth)
comment(thing_id, text, auth)
]]
local json = require "json"
local util = require "reddit.util"
@TurplePurtle
TurplePurtle / apod.py
Created August 9, 2012 04:38
APOD Wallpaperer
import os
import urllib2
import re
import ctypes
from _winreg import *
def apod():
url = "http://apod.nasa.gov/apod/"