Skip to content

Instantly share code, notes, and snippets.

View ultimapanzer's full-sized avatar

Brad Kurtz ultimapanzer

View GitHub Profile
@ultimapanzer
ultimapanzer / spread.js
Created December 3, 2015 16:42
spread doesn't mutate
var foo = { a: 1, b: 2 };
var bar = foo;
bar.c = 3;
console.log(bar); //=> { a:1, b:2, c:3 }
console.log(foo); //=> { a:1, b:2, c:3 } foo was mutated
//however
foo = { a: 1, b: 2};
@ultimapanzer
ultimapanzer / hn-black-bar-tampermonkey.js
Last active August 29, 2015 14:20
HN Black Titlebar Tampermonkey Script
// ==UserScript==
// @name HN Black
// @version 0.1
// @description blacks out HN title bar
// @author @ultimapanzer
// @match https://news.ycombinator.com/*
// ==/UserScript==
function addGlobalStyle(css) {
var head, style;
@ultimapanzer
ultimapanzer / unity3d-git-setup
Last active August 29, 2015 14:03
Unity3d basic .gitignore and git setup (as of Unity 4.5.1)
# .gitignore for unity
# =============== #
# Unity generated #
# =============== #
[Tt]emp/
[Ll]ibrary/
#Unity3D Generated File On Crash Reports
sysinfo.txt
;; Try it in the REPL or eval in Light Table
(require '[clojure.string :as string])
(def vowels [:a :e :i :o :u])
(defn char-is-consonant?
[char]
(not-any? #{(keyword char)} vowels))