Skip to content

Instantly share code, notes, and snippets.

View bogstandard's full-sized avatar
🌲
Making Things

Eric bogstandard

🌲
Making Things
View GitHub Profile
@bogstandard
bogstandard / pseudodo.js
Created March 13, 2019 23:47
Safari Animated Pseudo Element Content Polyfill
/**
pseudodo v0.3 Polyfill for animatable content properties on psuedo elements
in non-supporting browsers (eg. Safari)
Automatically detects psuedo elements with animations attached.
Load after StyleSheets have been computed.
Written by Eric D'Addio March 2019 https://twitter.com/oldnewstandard
*/
@bogstandard
bogstandard / Array.sleepSort.js
Created November 6, 2018 00:51
SleepSort in JS Array Prototype
Array.prototype.sleepSort = function(){
const timeout = (ms) => {
return new Promise(resolve => setTimeout(resolve, ms));
}
const spush = async (n) => {
await timeout(n);
this.shift();
this.push(n);
@bogstandard
bogstandard / .bash_profile
Created October 14, 2018 02:16
open Nth most recent file in current directory
# opens nth most recent file in current working directory
# use: nthrecent 5
function nthrecent() {
( open "`ls -t . | head -n$1 | tail -n1`" )
}