Skip to content

Instantly share code, notes, and snippets.

View bayleedev's full-sized avatar
🍿

Baylee Schmeisser bayleedev

🍿
View GitHub Profile
@bayleedev
bayleedev / slack-emojis.js
Created June 2, 2017 06:51
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.
class Author {
constructor (name) {
this.name = name
this.count = 0
}
increase () {
this.count++
}
}
const items = [1,2,3,4,5]
items.reduce((follower, leader) => {
console.log(follower, leader)
return leader
})
// OUTPUTS:
// 1, 2
// 2, 3
setnvm() {
if [ "$PWD" != "$MYOLDPWD" ]; then
MYOLDPWD="$PWD";
if [ -e "$PWD/.nvmrc" ]; then
nvm use
fi
fi
}
function cd () { builtin cd "$@" && setnvm; }

# FAQ

## Core vision

A fully extensible and open source app launcher for hackers, creators and dabblers. It comes with sane defaults to make it useful out of the box. But everything can be changed to fit your needs. Don't let others tell you the best way to be productive, configure it to be perfect for you.

## How do you compare to alternatives?

Zazu is the first launcher to treat plugins as first class citizens. Even the app finder is built as a plugin which can be replaced (if desired). This means plugins are designed as natural extensions of Zazu and they don't require a special trigger such as '/' or ','. This allows a more intuitive plugin API that doesn't hamper discoverability.

@bayleedev
bayleedev / MousetrapProxy.js
Last active February 27, 2017 23:07
Mousetrap will only bind a key event to one function, this makes it so you can bind it to as many as you like.
class MousetrapProxy {
constructor () {
this.events = {}
}
emit (key) {
if (!this.events[key]) return
this.events[key].forEach((cb) => cb())
}
const urls = [
'https://google.com',
'http://blainesch.com',
'https://github.com',
]
let follower = Promise.resolve()
for (let currentUrl of urls) {
follower = follower.then(() => {
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
function snakeToCamel (word, upperCamelCase) {
const sections = word.split('_')
return sections.map((section, i) => {
if (upperCamelCase || i > 0) {
return section[0].toUpperCase() + section.slice(1).toLowerCase()
}
return section.toLowerCase()
}).join('')
}
diff --git a/sass/main.scss b/sass/main.scss
index bed1fa2..00bb466 100644
--- a/sass/main.scss
+++ b/sass/main.scss
@@ -74,7 +74,7 @@ section#zazu {
padding: 0;
margin: 0;
max-height: 310px;
- overflow-y: scroll;
+ overflow-y: hidden;
Scenario 1: happy path
git clone is successful
npm install is successful
restart zazu
next:
no action - be fast!