- A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
- lengths are in any unit (ex: pixels)
- code snippets are in JavaScript
angleRad = angleDeg * Math.PI / 180;
from thespian.actors import * | |
from datetime import datetime, timedelta | |
from logging import getLogger, basicConfig, DEBUG | |
from random import randint | |
basicConfig(level=DEBUG) | |
log = getLogger(__name__) | |
class Postman(Actor): |
module.exports = { | |
authors: | |
[ | |
{ | |
id: 'cory-house', | |
firstName: 'Cory', | |
lastName: 'House' | |
}, | |
{ | |
id: 'scott-allen', |
[12:06] <TrevorTSG> Ben! | |
[12:07] <TrevorTSG> I am a technical recruiter, ipsofacto, I have no idea what's | |
going on here, but I have a position for a jQuery stud up | |
for grabs if you're game | |
[12:07] <TrevorTSG> here in the Boston area | |
[12:09] <ben_alman> nope | |
[12:09] <TrevorTSG> But you have to give me props for stalking you all the way | |
into a jquery chat room, right? | |
[12:15] TrevorTSG left IRC. (Ping timeout: 250 seconds) |
using System; | |
namespace RsaKeyConverter.Converter | |
{ | |
public static class BytesExtensions | |
{ | |
public static string ToBase64(this byte[] bytes) | |
{ | |
return Convert.ToBase64String(bytes); | |
} |
# ~/.gitconfig from @boblet | |
# initially based on http://rails.wincent.com/wiki/Git_quickstart | |
[core] | |
excludesfile = /Users/oli/.gitignore | |
legacyheaders = false # >git 1.5 | |
quotepath = false | |
# http://stackoverflow.com/questions/136178/git-diff-handling-long-lines | |
pager = less -r | |
# if ↑ doesn’t work, try: pager = less -+$LESS -FRX |
#! /usr/bin/env python | |
import redis | |
import random | |
import pylibmc | |
import sys | |
r = redis.Redis(host = 'localhost', port = 6389) | |
mc = pylibmc.Client(['localhost:11222']) |
# | |
# CoffeeScript for http://dealloc.me/demos/crime/2011.html | |
# Copyright (c) 2011 Justin Palmer <http://github.com/Caged> | |
# LICENSE: http://www.opensource.org/licenses/mit-license.php | |
$ -> | |
hash = document.location.hash | |
year = if hash then hash.replace('#', '') else 2011 | |
[pt,pl,pb,pr] = [35, 20, 20, 20] | |
w = (900 - (pl + pr)) / 2 | |
h = w |
<!DOCTYPE html> | |
<head> | |
<title>Snow</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script> | |
<script src="snow.js" type="text/javascript"/></script> | |
</head> | |
<body onload="init();"> | |
<canvas id="bgcanvas" width="410" height="316" style="position:absolute;z-index:2"></canvas> | |
<img src="globe_layers_2.png" style="position:absolute;z-index:3"> | |
<canvas id="fgcanvas" width="410" height="316" style="position:absolute;z-index:4"></canvas> |