Skip to content

Instantly share code, notes, and snippets.


Damon Oehlman DamonOehlman

View GitHub Profile
DamonOehlman / index.js
Created Aug 4, 2014
requirebin sketch
View index.js
var quickconnect = require('rtc-quickconnect');
var randomName = require('random-name');
var opts = {
room: 'quickconnect-demo-chat-room',
iceServers: require('freeice')()
quickconnect('', opts)
.on('channel:opened:chat', function(id, dc) {
DamonOehlman /
Last active Jan 24, 2021
General WebRTC tips and tricks collated over time
DamonOehlman /
Last active Dec 18, 2020
Awesome one liners (not to be used in bars)

Run the interactive command prompt on a particular container:

docker exec -it $(docker ps --filter "name=mysql*" --format "{{.ID}}") /bin/bash

Remove ALL registered containers:

docker container ls -a --format="{{.ID}}" | xargs docker container rm
DamonOehlman /
Last active May 27, 2020
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 /
Last active Apr 24, 2020
A list of games that I've enjoyed and would recommend. Some of them are more additive than others (I'll try and include emoji warnings).

Emoji guide:

  • 👯 Supports co-op gameplay (my preference over PvP)
  • 😵 Can get a bit addictive...
  • 💵 Game has a payments system and they try and get money from you other than through the purchase price
  • ⚙️ Can require a bit of a grind to be rewarding
  • 🎫 Available on MS Xbox Game pass which I think is reasonable value...
  • 💺 Best enjoyed in a couch co-op scenario


DamonOehlman / gist:3840144
Created Oct 5, 2012 — forked from schacon/gist:1
the meaning of gist
View gist:3840144
This is gist.
There are many like it, but this one is mine.
It is my life.
I must master it as I must master my life.
Without me gist is useless.
Without gist, I am useless.
DamonOehlman /
Last active May 15, 2019
Provisioning of node + nginx designed for use with vagrant shell provisioner. No need for chef, puppet.

This is a simple shell script that is designed to provision both nginx and node on your machine. I primarily wrote it for use with Vagrant and an example Vagrantfile is included in the Gist as well.

DamonOehlman /
Last active Feb 26, 2019
Kurento Media Server Installation (Debian Wheezy 64bit)

NOTE: This guide is currently incomplete.

Install general dependencies:

sudo apt-get install git build-essential cmake pkg-config libboost-dev libboost-test-dev \
     libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config \
     libssl-dev libsoup2.4-dev libboost-system-dev libboost-filesystem-dev \
     libogg-dev libtheora-dev libasound2-dev libvorbis-dev libpango1.0-dev \
     libvisual-0.4-dev libffi-dev libgmp-dev
DamonOehlman /
Last active Apr 24, 2018
Using nginx to proxy HTTPS to local non HTTPS servers

An nginx configuration that can be added to your /etc/nginx/sites-enabled directory to proxy from the local nginx server through to other servers running on other ports. Primarily this is useful when you want to view a site using HTTPS but don't want to associate the certificate with that local server.

The following proxys work:

http://localhost/ => http://localhost:9966/
https://localhost/ => http://localhost:9966/

https://localhost/<port>/ => http://localhost:<port>/
https://localhost/<port>/ => http://localhost:<port>/
DamonOehlman / bridge-client.js
Created Oct 4, 2011
Bridging eve -> -> eve
View bridge-client.js
var socket = io.connect(server),
reSock = /^sock\:.*$/i;
socket.on('connect', function() {
eve.on('*', function() {
// get the last argument
var lastArg = arguments.length ? arguments[arguments.length - 1] : null;
// if the last arg is a socket connection, then don't send it to the serve
// because we got it from the server...