Skip to content

Instantly share code, notes, and snippets.

zcmarine /
Last active Mar 30, 2018
Given a fibonacci number, create all lists of fibonacci numbers that sum to the given fibonacci number.
import logging
logger = logging.getLogger(__name__)
def build_fibonacci_numbers(num):
""" Create the fibonacci numbers up to and including a given fibonacci number """
if num <= 0:
raise ValueError('num must be greater than 0')
zcmarine / remap_capslock.lua
Created Mar 28, 2017
Hammerspoon capslock remapping: tap to Escape, hold in chord for Control
View remap_capslock.lua
-- Inspired by
-- You'll also have to install Karabiner Elements and map caps_lock to left_control there
len = function(t)
local length = 0
for k, v in pairs(t) do
length = length + 1
return length