Skip to content

Instantly share code, notes, and snippets.

Damon Oehlman DamonOehlman

Block or report user

Report or block DamonOehlman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
DamonOehlman / index.js
Created Apr 5, 2018
detect-browser requirebin example
View index.js
// enable logging to the requirebin output area
const console = require('demo-console');
const { detect } = require('detect-browser');
const browser = detect();
// handle the case where we don't detect the browser
if (browser) {
DamonOehlman /
Last active Jul 9, 2019
Awesome one liners (not to be used in bars)

Compiling the yarn workspaces that have changed since master:

git diff --name-only master | sed -E 's:packages/([A-Za-z0-9_\-]+)\/.*:\1:' | uniq | xargs -I {} yarn workspace {} compile
DamonOehlman /
Last active Aug 24, 2016
My TODO list
DamonOehlman /
Last active Jul 20, 2016
Helpful commands for doing things with ImageMagick, FFmpeg, etc

Convert a series of images into an MPEG file:

$ MAGICK_THREAD_LIMIT=2 MAGICK_MEMORY_LIMIT=2G convert -delay 5 -quality 100 *.JPG out.mpeg
DamonOehlman /
Last active Jun 1, 2016
Clone all the elm packages locally.

I'm sure there's probably a more efficient way to do this, but before CampJS I'm pretty keen to bring down all the elm packages that are available from the elm package repository.

This seems to do the trick :)

curl -s \
  | jq -r ".[].name" \
  | xargs -L 1 -I{} bash -c "[[ ! -d {} ]] && git clone 'git://{}.git' '{}' || true"
DamonOehlman /
Last active Aug 15, 2018
How to prepare for going offline

The following is an "oh noes, where's my Internet" guide to surviving as a coder with no or limited Internet. Primarily the guide is focused on those who will be doing JS development (and using npm as a package manager) but some of the advice is useful for other environments also.

Step 1. Clone all things

Tooling in this steps require that you have git installed, and use github for your repositories.

One thing I really like to do when I get a bit of time offline, is clean up an old repository that I once thought was useful. I rarely know about what project this might be in advance. As a result, I like to clone all the things from my personal github account.

To do this I recommend using multirepo, which is best installed (at the moment) like so:

DamonOehlman /
Created Nov 11, 2015
A list of personal tips and tricks that I'm compiling on my journey back from using a linux machine, complete with a tiling window manager back to OSX.


A pretty nice tiling window manager, that does a good (enough) job:

How to find an app id for an app you want to float

> osascript -e 'id of app "Finder"'
DamonOehlman /
Last active Sep 28, 2015
Debugging Browser Graphical Performance (NOTES TO SELF)
You can’t perform that action at this time.