Skip to content

Instantly share code, notes, and snippets.

Q: Can we make this a gated community?

A: No. It would require buying the streets, which would be very expensive and as far as we know the city is not even selling, as the general plan of the city discourages new gated communities.

Q: Do I have to submit a plan for backyard landscaping?

A: Yes, to the HOA.

Q: Why are we considering license plate reader cameras?

@jraines
jraines / electors.clj
Last active December 2, 2016 04:15
electors.clj
(ns electoral.core
(:require [csv-map.core :as csv])
(:gen-class))
(defn get-votes [e state-name]
(:votes (first (filter #(= state-name (:state %)) e))))
(def data
(setq adjust-parens-packages
'(
;; package names go here
adjust-parens
))
;; List of packages to exclude.
(setq adjust-parens-excluded-packages '())
;; For each package, define a function adjust-parens/init-<package-name>
@jraines
jraines / spacemacs.el
Created November 11, 2015 19:48
spacemacs config so far
(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)
(spacemacs/toggle-maximize-frame)
(setq projectile-enable-caching t)
@jraines
jraines / gist:476dae7017632df4a4b1
Created October 20, 2015 17:35
Minimal AWS Lambda Alexa js
/**
* This sample demonstrates a simple skill built with the Amazon Alexa Skills Kit.
* For additional samples, visit the Alexa Skills Kit developer documentation at
* https://developer.amazon.com/appsandservices/solutions/alexa/alexa-skills-kit/getting-started-guide
*/
// 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 {
(ns ^:figwheel-always noise.core
(:require))
(enable-console-print!)
(def gradients
"test"
[[0.14 0.21]
[0.14 -0.21]
@jraines
jraines / gist:67462aa9419d9b55db27
Last active August 29, 2015 14:27
combinations_problem
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
jraines / quiz.cljs
Created August 4, 2015 19:50
Attempt to do a kinda sorta redux like app in ClojureScript
(ns ^:figwheel-always ramquiz.core
(:require [quiescent.core :as q]
[quiescent.dom :as d]))
(enable-console-print!)
(declare render-app)
;; the data
@jraines
jraines / gist:567e1da3645725664288
Created July 15, 2015 19:46
Top 10 Ruby Enumerable methods
class Elevator
def initialize(floor)
@floor = floor
end
attr_accessor :floor
def greet
for i in 0..floor
if i == 0
puts "Basement."