Skip to content

Instantly share code, notes, and snippets.

View johnjelinek's full-sized avatar

John Jelinek IV johnjelinek

  • Montgomery, TX
  • 04:01 (UTC -05:00)
View GitHub Profile
(ns string-calculator
"My implementation of"
(:use [clojure.test :only (is)])
(:require [ :as edn]
[clojure.string :as string :refer [join split]]))
(defn parse-numbers [x]
(map edn/read-string
(defn slow-seq [s ms]
(let [c (async/chan)]
(loop [remain s]
(if (empty? remain)
(async/close! c)
(async/<! (async/timeout ms))
(async/>! c (take 10 remain))
(recur (drop 10 remain))))))
johnjelinek / boids.cljs
Last active August 29, 2015 14:05 — forked from rm-hull/boids.cljs
(ns boids
(:use [enchilada :only [canvas ctx value-of canvas-size]]
[jayq.core :only [show]]
[monet.core :only [animation-frame]]
[monet.canvas :only [save restore
begin-path move-to line-to close-path
stroke stroke-style fill fill-rect fill-style
rotate translate]]
[boids.rules :only [step make-boid]])
(:require [boids.vector :refer [heading]]))


The only cross-platform browser that fits in a Gist!

One line install. Works on Linux, MacOSX and Windows.

Local Install

$&gt; npm install
johnjelinek /
Created June 23, 2012 06:58
countdown in coffeescript
counter = (futureDate) ->
today = new Date
count = Math.floor (futureDate - today) / 1000
countdown = setInterval ->
$("#d").html Math.floor count / ( 60 * 60 * 24 )
temp = count % ( 60 * 60 * 24 )
$("#h").html Math.floor temp / ( 60 * 60 )
temp = count % ( 60 * 60 )
$("#m").html Math.floor temp / 60
temp = count % 60
johnjelinek /
Last active December 20, 2015 02:29
Snippets from to accompany the blogpost on processing streaming data with the TradeStation WebAPI.
public Thread getBarchartStream(Observer observer, String symbol, int interval, String intervalType, String startDate) {
Request request = new RequestBuilder("GET")
.setUrl(BASEURL + String.format("stream/barchart/%s/%s/%s/%s",
symbol, interval, intervalType, startDate))
.addHeader("Content-Type", "application/x-www-form-urlencoded")
.addHeader("Authorization", "Bearer " + this.token.getAccess_token())
// create an event source
final StreamSource streamSource = new StreamSource<IntradayBar>(request, IntradayBar.class);
johnjelinek /
Last active April 22, 2016 07:49
Windows Vagrant Box Maker

Windows Vagrant Box Maker

It's been incredibly difficult to get Windows boxes up on Between licensing and trial keys, offering a windows box has been a challenge. Not anymore! With the Windows Vagrant Box Maker, a fully functional box is generated daily and can be downloaded whenever you need it!

johnjelinek / csharplambda.yaml
Last active December 5, 2016 17:38
C# Lambda
AWSTemplateFormatVersion: '2010-09-09'
Description: Create a Serverless stack with CloudFormation using Serverless Application Model
Transform: AWS::Serverless-2016-10-31
Type: AWS::Serverless::Function
Description: Use a lambda function to print Hello World
Handler: csharplambda::CSharpFunction.HelloWorld::Handler
Runtime: dotnetcore1.0

Beginning to Clojure

Lately, I’ve been training some people outside of my day job in Clojure. This

johnjelinek / debug.txt
Created June 24, 2014 22:00
vagrant debug
INFO global: Vagrant version: 1.6.2
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_EXECUTABLE="/Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.2/bin/vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/Applications/Vagrant/bin/../embedded"
INFO global: VAGRANT_LOG="debug"