This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Gate is a small web app for quick text entry along with forwarding entered | |
// text to other endpoints (which I use heavily in my personal workflow). I've | |
// only done a little coding in Go so far, so I'm sure this code is probably | |
// not as idiomatic as I'd like. (I'd also ordinarily split this up into | |
// multiple files. And do several things differently. Hindsight!) | |
package main | |
import ( | |
"crypto/md5" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Rust code sample | |
// This is extracted from a path tracer I wrote for class. I can't | |
// post the whole thing per the class rules, so you get this redacted | |
// version instead. | |
extern crate nalgebra as na; | |
use super::img::Image; | |
use super::objects::traits::*; | |
use super::structs::*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Code for https://blogs.bencrowder.net/cg/2012/line-art-experiments/ | |
# Uses PIL (pip install pillow) | |
import random, math | |
from PIL import Image, ImageDraw | |
image_size = 4800 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rule | |
size 6x9"; | |
# alternates | |
size letter; | |
size 210x297mm; | |
size a4; | |
font Arno Pro, 10/13pt; | |
margin 1"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bot: Helm | |
// Ruleset: default | |
// -------------------------------------------------- | |
var Helm = function() {}; | |
Helm.prototype = new Bot(); | |
Helm.prototype.setup = function() { | |
this.timer = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
updated_date: "Feb 2015" | |
districts: | |
- david-smith | |
- william-adams | |
- robert-taylor | |
people: | |
- "David | Smith | Elizabeth | 435-131-1414 | 1000 S 1000 E" | |
- "William | Adams | Sarah | 435-272-2923 | 920 S 700 E" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For PlotDevice (plotdevice.io) | |
# This code is crappy. It's hastily thrown together prototype code and shouldn't | |
# be used in anything remotely resembling a production environment. | |
# Originally modeled after some code in the PlotDevice manual (http://plotdevice.io/tut/Geometry) | |
CIRCLE_CENTER_X = 200 | |
CIRCLE_CENTER_Y = 200 | |
INNER_CIRCLE_RADIUS = 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For PlotDevice (plotdevice.io) | |
# This code is crappy. It's hastily thrown together prototype code and shouldn't | |
# be used in anything remotely resembling a production environment. | |
def draw_sparkline(x, y, data, vital_size=1.5, child_size=0.8, marriage_size=1.5): | |
reset() | |
translate(x, y) | |
death_x = data['death'] - data['birth'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import re | |
import codecs | |
import requests | |
import bs4 | |
# Change these | |
year = 2013 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# --- Required variables --- | |
RSS_URI="/rss" | |
MAIL_TO="[email protected]" | |
LOG_FILE="/var/log/httpd/access_log" | |
LOG_DATE_FORMAT="%d/%b/%Y" | |
# --- Optional customization --- |
NewerOlder