Skip to content

Instantly share code, notes, and snippets.


Jake Teton-Landis justjake

View GitHub Profile
View derp.txt
-- DSL language syntax --
/* example syntax: python-like */
doctype 5
title My Awesome Page
id: global
justjake / zenburn.css
Created Jul 6, 2012
Bare Minimum CSS
View zenburn.css
/* search your feelings, you know it to be true */
body {
color: #dcdccc;
background: #292929;
font-family: sans-serif;
margin: 1em 5.55%;
/* optional: nice text spacing */
body { line-height: 1.5; }
justjake / fizzbuzz.clj
Created Nov 25, 2012
Extensable and functional fizz-buzz in Clojure
View fizzbuzz.clj
Here is FizzBuzz written by a
first-day clojure bro)
(defn divisible-by [by-num]
(fn [num]
(= 0 (rem num by-num))))
(def tests-and-outputs
justjake /
Created Nov 28, 2012
Fibonocci CLI tool
#!/usr/bin/env python
"""Fibonacci calculator with better precision than Javascript"""
def main():
import argparse
parser = argparse.ArgumentParser(description='Show the Fibonacci series number')
# method to use
parser.add_argument('-r', '--recursive', action='store_true',
help="Use a recursive method")
View crashplan
#!/usr/bin/env zsh
unlink-prop() {
link-prop() {
View format.js
update = {
/* Two basic sections. */
"Nodes": {
/* Nodes is a int->node map.
* nodes that already exist are updaasdted
* by the fields supplied in the Nodes section
* delete a node by passing `null` or a string as the value
* id, name, class fields required for new node creationjsdfA
* */
justjake /
Last active Dec 30, 2015
Line drawing demo. Use with Coffeescript mode in Processing 2
setup: ->
# Processing.js setup
size(1600, 900)
class Point
constructor: (@x, @y) ->
sub: (other) ->
new Point(@x - other.x, @y - other.y)
magnitude: ->
justjake /
Last active Dec 30, 2015
Power of anonymous functions

The relevent bits

Plotting from euclidean space to screen coordinates in Coffeescript, for my Spectrograph class

plot: (width, height, max_Y) ->
 # re-generate coeficceint functions
 if ! (@_width == width && @_height == height && @_max_Y == max_Y)
   w_coef = width / SIZE
   h_coef = height / max_Y # consider changing this to absolute w/height? nah
   # @X and @Y transform normal euclidean X, Y points into screen X Y points
justjake /
Last active Aug 29, 2015
Convert Titanfall end-of-game scoreboards into text files
# Converts a titanfall scoreboard from any image format into a TXT document
# Uses imagemagick for image magick (apt-get install imagemagick)
# Uses tesseract for OCR (apt-get install tesseract-ocr)
set -e
justjake /
Created Dec 25, 2014
Dispelling some myths

Cut fruit looses nutrition? Not significantly.

Cut fruit looses about 10% to 25% of its vitamin C and other oxidizing nutrients after 6 days in refrigeration; it visibly spoils before nutrition loss is significant. Most oft-cited paper with this result is Quality Changes and Nutrient Retention in Fresh-Cut versus Whole Fruits during Storage (American Chemical Society), you cans find a brief summary from the NYT Nutrition desk here:, and a google search for "cut fruit loses nutrition" has top results mostly pointing to that study. An argument can be made for pre-cut vegetables and fruits being less tasty after a week of near-freezing refrigeration, but this "4 hours" thing is malarky.

Vitamin C reacts with "metal" to become useless? No.

I found a few articles discussing vitamin C reacting with free iron & copper in a H2O2 (hydrogen peroxide) solution to become a free r