Skip to content

Instantly share code, notes, and snippets.

View harrislapiroff's full-sized avatar
😍
󠁼

Harris Bard Lapiroff harrislapiroff

😍
󠁼
View GitHub Profile
@harrislapiroff
harrislapiroff / gist:8810294
Last active August 29, 2015 13:56
Wikipedia's List of Birds by Common Name, put in alphabetical order
Abd al-Kuri Sparrow
Abyssinian Nightjar
Abyssinian Oriole
Acadian Flycatcher
Acorn Woodpecker
Adelie Penguin
Afghan Snowfinch
African Barred Owlet
African Black-headed Oriole
African Broadbill
@harrislapiroff
harrislapiroff / chasing_lights.py
Last active August 29, 2015 13:57
RPi Chasing Lights
#!/usr/bin/env python
import signal
import sys
import time
from RPi import GPIO
LIGHT_ORDER = (7, 12, 16, 18, 22, 11,) # The number of the GPIO pins in the order lights are wired to them
DELAY = .05
#!/usr/bin/python
import os
import SimpleHTTPServer
import BaseHTTPServer
from optparse import OptionParser, make_option as opt
# these are the defaults for server settings
DEFAULT_PORT = 8000
@harrislapiroff
harrislapiroff / snow.css
Created January 20, 2012 18:01
Oberlin College's Snow Styles
.noPointerEvents #hd, .noPointerEvents #glob{
position:relative;
z-index: 1337 !important;
}
.pointerEvents #snow{
z-index:1337;
}
body, html, #all, #all::before{
@harrislapiroff
harrislapiroff / snow.coffee
Created January 20, 2012 17:58
Oberlin College's Snow Script
KEYFRAME_RATE = 200
HORIZONTAL_DELTA = 2
VERTICAL_DELTA = 4
EASING_FUNCTION = "linear"
TOTAL_SNOWFLAKES = 50
EXCLUDE_MOBILE = true
CANVAS_WIDTH_FN = () -> $('#all').width()
CANVAS_HEIGHT_FN = () -> 125
# by_probability will return val1 prob% of the time, val2 otherwise
@harrislapiroff
harrislapiroff / settings.py
Created April 12, 2012 18:36
OnCampus Development Settings
import os
# this little trick lets us use relative paths
here = lambda x: os.path.join(os.path.abspath(os.path.dirname(__file__)), x)
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
@harrislapiroff
harrislapiroff / ColorExtractor.js
Created December 18, 2012 21:49
Selects colors from an image.
/*
* ColorExtractor
*
* Usage:
*
* extractor = new ColorExtractor("/path/to/image.jpg");
* extractor.ready(function (data) {
* document.body.styles.backgroundColor = data['edge_color'].hex_for_css();
* });
*
@harrislapiroff
harrislapiroff / smoothscrolling.js
Last active December 19, 2015 00:29
Add smooth scrolling to in-page anchors.
$(document.body).on('click', '[data-smooth-scroll]', function(e){
e.preventDefault();
$('html,body').animate({scrollTop:$(this.hash).offset().top}, 500);
if (Modernizr.history) window.history.pushState({}, this.hash, this.hash);
});
@harrislapiroff
harrislapiroff / GitHub_Issue_Popovers.js
Last active November 28, 2016 16:23
GitHub Issue Popovers GreaseMonkey Script
// ==UserScript==
// @name GitHub Issue Popovers
// @namespace chromamine_github_enhancer
// @include http://github.com/*
// @include http://*.github.com/*
// @include https://github.com/*
// @include https://*.github.com/*
// @require https://cdnjs.cloudflare.com/ajax/libs/tether/1.3.7/js/tether.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/tether-drop/1.4.2/js/drop.min.js
// @grant GM_addStyle

Keybase proof

I hereby claim:

  • I am harrislapiroff on github.
  • I am harrislapiroff (https://keybase.io/harrislapiroff) on keybase.
  • I have a public key ASD8bRwZDKB6kCfzKUj2zN18an1w-0WKGuW3Pbg6GuIBfgo

To claim this, I am signing this object: