Skip to content

Instantly share code, notes, and snippets.

Jeremy Raines jraines

Block or report user

Report or block jraines

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jraines / electors.clj
Last active Dec 2, 2016
View electors.clj
(ns electoral.core
(:require [csv-map.core :as csv])
(defn get-votes [e state-name]
(:votes (first (filter #(= state-name (:state %)) e))))
(def data
View package.el
(setq adjust-parens-packages
;; package names go here
;; List of packages to exclude.
(setq adjust-parens-excluded-packages '())
;; For each package, define a function adjust-parens/init-<package-name>
jraines / spacemacs.el
Created Nov 11, 2015
spacemacs config so far
View spacemacs.el
(defun dotspacemacs/user-config ()
"Configuration function for user code.
This function is called at the very end of Spacemacs initialization after
layers configuration. You are free to put any user code."
(setq-default neo-vc-integration nil)
(setq projectile-enable-caching t)
jraines / gist:476dae7017632df4a4b1
Created Oct 20, 2015
Minimal AWS Lambda Alexa js
View gist:476dae7017632df4a4b1
* This sample demonstrates a simple skill built with the Amazon Alexa Skills Kit.
* For additional samples, visit the Alexa Skills Kit developer documentation at
// Route the incoming request based on type (LaunchRequest, IntentRequest,
// etc.) The JSON body of the request is provided in the event parameter.
exports.handler = function (event, context) {
try {
View perlin-attempt.cljs
(ns ^:figwheel-always noise.core
(def gradients
[[0.14 0.21]
[0.14 -0.21]
jraines / gist:67462aa9419d9b55db27
Last active Aug 29, 2015
View gist:67462aa9419d9b55db27
You have a set A of n integers.
For every i ∈ A,
i may or may not also belong to a replacement set B, which may be the empty set,
where any k ∈ B can replace i in the original set.
Each replacement set B can be of any size.
Is there a way (especially an efficient way) to generate
all combinations of size n (call it A') where:
jraines / quiz.cljs
Created Aug 4, 2015
Attempt to do a kinda sorta redux like app in ClojureScript
View quiz.cljs
(ns ^:figwheel-always ramquiz.core
(:require [quiescent.core :as q]
[quiescent.dom :as d]))
(declare render-app)
;; the data
jraines / gist:567e1da3645725664288
Created Jul 15, 2015
Top 10 Ruby Enumerable methods
View gist:567e1da3645725664288
View gist:eedf58e3eae3774067d6
class Elevator
def initialize(floor)
@floor = floor
attr_accessor :floor
def greet
for i in 0..floor
if i == 0
puts "Basement."
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Sierpinski triangle</title>
<script src="" charset="utf-8"></script>
<script type="text/javascript">
//Width and height
You can’t perform that action at this time.