Skip to content

Instantly share code, notes, and snippets.

(defvar hydra-map-of-major-modes nil)
(defun concat-syms (&rest syms)
(intern (apply #'concat (mapcar #'symbol-name syms))))
(defvar hydra-leader-key "¡")
(defvar hydra-map-of-minor-modes nil)
(defun add-hydra-minor (mode name key hydra)
@maninalift
maninalift / cleaver.ls
Last active December 11, 2015 00:29
These are a couple of utility functions I have found useful and was surprised not to find equivalents in underscore, I'm sure it's not a new idea.EDIT: two mins later I find prelude.ls does include a function covering at least the boolean case, but using an array output instead of an object. http://gkz.github.com/prelude-ls/#f-partitionEDIT2: An…
{map, partition, obj-to-func, sort} = require \prelude-ls
{render, div, h1, p} = require \teacup
say = console.log
# UTILITIES #
categorize_orig = (f, a) -->
r = {}
for v in a
k = f v
@maninalift
maninalift / moveframetest.html
Created August 21, 2012 20:38
test issues with onMouseMove and onFrame events for multiple canvases in paperscript 2.2 and nightly
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Rounded Rectangles</title>
<link rel="stylesheet" href="style.css">
<script type="text/javascript" src="paper22.js"></script>
<script type="text/paperscript" canvas="canvas" >
var mousePoint = view.center;