Skip to content

Instantly share code, notes, and snippets.


Baylee Schmeisser bayleedev

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bayleedev on github.
  • I am mxbaylee ( on keybase.
  • I have a public key ASAGshYBVX4yu_D1IR9NZXiv1ooK-Hw6W-CNntE244dR5wo

To claim this, I am signing this object:

View automator.workflow
on randomString(aLength)
set randomChars to {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}
set aString to ""
repeat aLength times
set aString to aString & some item of randomChars
end repeat
return aString
end randomString

Performance Test

The goal is to determine if the overhead of multiple setTimeout is heavier than a single setInterval.

Each test has 60 iterations of a function wait that takes 30ms to run, making the program time 60*30=1800ms, so running these files should capture the overhead by subtracting 1800ms from the total run time.


It took around 1816ms or around ~16ms of overhead.

View echo.js
var b = 20;
function foo () {
var a = 10;
console.log('hello $a+$b=30'.replace(/\$\w+/g, function (el) {
return eval(el.substr(1))
bayleedev / slack-emojis.js
Created Jun 2, 2017
A script to see who's created the most slack emojis on your team. Paste this into the console on the `customize emojis` page on slack.
View slack-emojis.js
class Author {
constructor (name) { = name
this.count = 0
increase () {
View leader-follower.js
const items = [1,2,3,4,5]
items.reduce((follower, leader) => {
console.log(follower, leader)
return leader
// 1, 2
// 2, 3
setnvm() {
if [ "$PWD" != "$MYOLDPWD" ]; then
if [ -e "$PWD/.nvmrc" ]; then
nvm use
function cd () { builtin cd "$@" && setnvm; }
bayleedev / MousetrapProxy.js
Last active Feb 27, 2017
Mousetrap will only bind a key event to one function, this makes it so you can bind it to as many as you like.
View MousetrapProxy.js
class MousetrapProxy {
constructor () { = {}
emit (key) {
if (![key]) return[key].forEach((cb) => cb())
View power.osa
on alfred_script(q)
set theName to (q)
set isRunning to false
tell application "System Events"
if exists process "OmniFocus" then
set isRunning to true
end if
end tell