Skip to content

Instantly share code, notes, and snippets.

@miketahani
miketahani / index.html
Last active January 30, 2018 12:56
cheap/hacky canvas hitboxes
<!doctype html>
<html>
<head>
<meta charset='utf-8'>
<style>
</style>
</head>
<body>
<div id='root'>
@miketahani
miketahani / grabber.py
Created January 24, 2018 20:16
egghead.io series scraper
#!/usr/local/bin/python3
# one-off scraper for egghead.io videos in a series
# usage: chmod +x grabber.py && ./grabber.py <series stub>
# requires youtube-dl (`brew install youtube-dl`)
import os
import subprocess
import json
import argparse
from urllib.request import urlretrieve
@miketahani
miketahani / Blink.jsx
Created January 24, 2018 17:18
React <blink>
@miketahani
miketahani / .block
Last active July 6, 2016 00:47 — forked from mbostock/.block
Stroke Dash Interpolation
license: gpl-3.0
@miketahani
miketahani / GIF-Screencast-OSX.md
Created June 30, 2016 23:11 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# scrape complex systems article pdfs
# requires bs4: `pip install beautifulsoup4`
import os
import re
import json
from urllib import urlopen as get, urlretrieve as save
from bs4 import BeautifulSoup as bs
@miketahani
miketahani / index.html
Last active January 19, 2018 12:25
map tile viewer
<!doctype html>
<html>
<head>
<meta charset='utf-8'>
<link rel='stylesheet' href='http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css' />
<style>
* {
box-sizing: border-box;
}
@miketahani
miketahani / actions.js
Created April 20, 2016 08:07 — forked from roman01la/actions.js
Redux WebSockets recipe
const MODULE_NAME = 'base-app/events/'
export const CONNECT_WS = MODULE_NAME.concat('CONNECT_WS')
export const DISCONNECT_WS = MODULE_NAME.concat('DISCONNECT_WS')
export const SUBSCRIBE_WS = MODULE_NAME.concat('SUBSCRIBE_WS')
export const UNSUBSCRIBE_WS = MODULE_NAME.concat('UNSUBSCRIBE_WS')
export const EMIT_WS = MODULE_NAME.concat('EMIT_WS')
export const NEW_EVENT = MODULE_NAME.concat('NEW_EVENT')
export const ADD_EVENT = MODULE_NAME.concat('ADD_EVENT')
@miketahani
miketahani / index.html
Last active April 19, 2016 17:29
flocking example
<!doctype html>
<html>
<head>
<meta charset='utf-8'>
<style>
* {
box-sizing: border-box;
}
body,
@miketahani
miketahani / index.html
Last active April 15, 2016 17:58
faded circles
<!doctype html>
<html>
<head>
<meta charset='utf-8'>
<style>
* {
box-sizing: border-box;
}
body,