Skip to content

Instantly share code, notes, and snippets.

View zephraph's full-sized avatar

Justin Bennett zephraph

View GitHub Profile
@zephraph
zephraph / clean_node_modules.sh
Last active June 13, 2023 13:53
A shell script to clean up all node_modules in projects that haven't been touched in a couple weeks.
#!/bin/bash
DAYS_SINCE_LAST_CHANGE=14 # If a project hasn't been touched in this long its node_modules will be deleted
SEARCH_PATH="./Git" # Update this to the path where your code is stored
TOTAL_BYTES_REMOVED=0
Mb=1000000
Kb=1000
node_modules=$(find $SEARCH_PATH -name "node_modules" -type d -prune)
@zephraph
zephraph / SketchSystems.spec
Last active January 14, 2019 21:15
TabTimerState
TabTimerState
NotStarted
tabActivated -> SetTimer
TabTimerTicking
tabDeactivated -> TimerPaused
timerExpired -> TimerWaitingToReset
timerReset -> TabTimerTicking
deactivateTimers -> NotStarted
TimerPaused
tabActivated -> TabTimerTicking
### Keybase proof
I hereby claim:
* I am zephraph on github.
* I am zephraph (https://keybase.io/zephraph) on keybase.
* I have a public key ASD1RxP1w5y9jQgHhB6PxWD5KmyzeRSyO0CG2C4gMdiAFQo
To claim this, I am signing this object:
@zephraph
zephraph / pre-commit
Last active March 11, 2018 03:40
Git hook for automatically switching between work/oss accounts depending on the directory
#!/usr/bin/python
# This file should live at ~/.git/hooks
import os
from subprocess import call
if "git/work" in cwd:
print "Using work account"
call("git config user.name <Your name>", shell=True)
@zephraph
zephraph / streamify.js
Created August 19, 2016 03:54
Streamify the things
const streamify = (tree) =>
pipe(
keys,
filter(key => tree.hasOwnProperty(key)),
map(key => ({
[`${key}$`]: typeof tree[key] === 'function' && typeof tree[key].then === 'function'
? (...args) => K.fromPromise(tree[key].apply(null, args))
: typeof tree[key] === 'object'
? streamify(tree[key])
: tree[key]
@zephraph
zephraph / SassMeister-input-HTML.html
Created February 13, 2016 19:06
Generated by SassMeister.com.
<div class="capsule">
<header class="capsule__header">
<h1 class="capsule__headline">What We're Loving Now</h1>
<a class="capsule__cta" href="#">See More!</a>
<p class="capsule__description">A few of the things we like</p>
</header>
<section class="capsule__content">
@zephraph
zephraph / SassMeister-input-HTML.html
Created February 13, 2016 18:53
Generated by SassMeister.com.
<div class="capsule">
<header class="capsule__header">
<h1 class="capsule__headline">What We're Loving Now</h1>
<a class="capsule__cta" href="#">See More!</a>
<p class="capsule__description">A few of the things we like</p>
</header>
<section class="capsule__content">
@zephraph
zephraph / SassMeister-input-HTML.html
Created January 28, 2016 20:10
Generated by SassMeister.com.
<div class="EditorialPromo EditorialPromo--3up">
<header class="Header">
<h1 class="Header-headline">What We're Loving Now</h1>
<a class="Header-cta" href="#">See More!</a>
<p class="Header-description">A few of the things we like</p>
</header>
<ul class="MediaList">
@zephraph
zephraph / SassMeister-input-HTML.html
Last active January 26, 2016 16:37
Generated by SassMeister.com.
<div class="EditorialPromo">
<header class="EditorialPromo-headline">
Editorial Promo
</header>
</div>
@zephraph
zephraph / SassMeister-input-HTML.html
Created January 26, 2016 16:36
Generated by SassMeister.com.
<div class="EditorialPromo media">
<header class="EditorialPromo media-headline">
Editorial Promo
</header>
</div>