Skip to content

Instantly share code, notes, and snippets.

View DamonOehlman's full-sized avatar

Damon Oehlman DamonOehlman

View GitHub Profile
@DamonOehlman
DamonOehlman / default.conf
Created April 17, 2014 05:21
Simple nginx configuration for proxying HTTPS traffic to a local port
server {
listen 443;
server_name localhost;
root html;
index index.html index.htm;
ssl on;
ssl_certificate server.crt;
ssl_certificate_key server.key;
@DamonOehlman
DamonOehlman / README.md
Last active June 12, 2022 08:10
Research for building an Message Bus Centric Application using Node

Message Bus App Architecture

This is some research focused around looking for node modules that support the development of an application that makes heavy use of a central message bus for cross component communication. The process for identifying potential components was simply to start by looking for packages that depend node the node-redis module, as at this this stage we see redis being the mechanism for powering the bus.

Potential Components

MQTT Centric

@DamonOehlman
DamonOehlman / get-browsers.sh
Created January 13, 2014 06:31
A shell script for getting binaries of various different browsers on linux and installing them to a `~/browsers` directory.
#!/usr/bin/env bash
FF_CDN="http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases";
FF_PLATFORM=$(echo "$(uname -s)-$(uname -m)" | tr '[:upper:]' '[:lower:]');
FF_LOCALE='en-US';
function getFirefox {
local targetUrl
while [ $1 ]; do
@DamonOehlman
DamonOehlman / npmd-all-the-things
Last active December 28, 2015 04:38
In preparation for potentially having no net access for a while, I'm using @dominictarr's [npmd](https://github.com/dominictarr/npmd) to bring modules I need (or potentially might use down locally). I'm sure the script can use some improvements, but it works well enough for me know.Basically, head into a parent directory somewhere where you have…
#!/usr/bin/env bash
getopts ":r:" RECURSE
for dir in *; do
if [ -d "${dir}" ]; then
pushd "$dir" > /dev/null
if [ -e package.json ]; then
echo "reinstalling packages with npmd for: ${dir}"
rm -rf node_modules
@DamonOehlman
DamonOehlman / README.md
Last active October 30, 2023 20:03
General WebRTC tips and tricks collated over time
@DamonOehlman
DamonOehlman / README.md
Created October 31, 2013 10:21
Modules in NPM that look interesting with regards to generating CSS with JS (and some other things discovered along the way).

Currently trawling NPM in search of a node module that makes working with CSS and browserified code "feel" better. My first thought was to seek out an existing project (or create one) that took a programmatic approach to CSS generation.

Here's what I've found:

Generators in Code

Shortlist

  • jcss: Some nice features, and worthy of further investigation. Looks active.
@DamonOehlman
DamonOehlman / Makefile
Last active December 25, 2015 15:39
Simple and fairly generic makefile for building a UMDjs distribution for a browserifiable module
MODULE_NAME=glue
REQUIRED_TOOLS=browserify uglifyjs st inotifywait
PHONY: dist
$(REQUIRED_TOOLS):
@hash $@ 2>/dev/null || (echo "please install $@" && exit 1)
dist: $(REQUIRED_TOOLS)
@mkdir -p dist
@DamonOehlman
DamonOehlman / system_recipe
Last active December 25, 2015 03:38
An example system recipe for bashinate: https://bitbucket.org/DamonOehlman/bashinate
# bootstrap www -> /opt/local/www
clone https://bitbucket.org/DamonOehlman/nginx-bootstrap.git www
# install stuff based on defined versions (overrides will be accepted also)
# NOTE: installs are localized (/opt/local/nginx/1.4.1 /opt/local/node/0.10.20)
nginx 1.4.1
node 0.10.20
# install an npm package
npm install -g deploy
@DamonOehlman
DamonOehlman / index.js
Created October 8, 2013 00:55
requirebin sketch
var quickconnect = require('rtc-quickconnect');
var crel = require('crel');
var rtc = require('rtc');
// create containers for our local and remote video
var local = crel('div', { class: 'local' });
var remote = crel('div', { class: 'remote' });
var peers = {};
var peerVideos = {};
@DamonOehlman
DamonOehlman / topo.json
Created September 26, 2013 01:41
Um, wow, github detects GeoJSON (specifically [TopoJSON](https://github.com/mbostock/topojson/)) snippets and creates a leaflet map display... again, wow. This is the topography data supplied for the nytimes americas cup visualization: http://www.nytimes.com/interactive/2013/09/25/sports/americas-cup-course.html?_r=0
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.