Skip to content

Instantly share code, notes, and snippets.

View TylerSustare's full-sized avatar

Tyler Sustare TylerSustare

View GitHub Profile
@seansullivan
seansullivan / async_action_for_items.js
Last active September 5, 2019 17:16
Perform Async Action over Items using Async/Await
const results = await items.reduce(async (previousPromise, item) => {
const collection = await previousPromise;
try {
const result = await doSomethingAsync(item);
collection.successes.push(result);
} catch(e) {
collection.errors.push(e);
}
# Rails production setup via SQLite3 made durable by https://litestream.io/
# Copy this to Dockerfile on a fresh rails app. Deploy to fly.io or any other container engine.
#
# try locally: docker build . -t rails && docker run -p3000:3000 -it rails
#
# in production you might want to map /data to somewhere on the host,
# but you don't have to!
#
FROM ruby:3.0.2
@DavidToca
DavidToca / git.plugin.zsh
Created July 10, 2012 22:17
oh-my-zsh git alias
# Aliases
alias g='git'
compdef g=git
alias gst='git status'
compdef _git gst=git-status
alias gl='git pull'
compdef _git gl=git-pull
alias gup='git fetch && git rebase'
compdef _git gup=git-fetch
alias gp='git push'