Skip to content

Instantly share code, notes, and snippets.

View amokan's full-sized avatar

Adam Mokan amokan

  • Grain
  • Chandler, Arizona
  • 11:44 (UTC -07:00)
View GitHub Profile

Docker Cheat Sheet

Why

Why Should I Care (For Developers)

"Docker interests me because it allows simple environment isolation and repeatability. I can create a run-time environment once, package it up, then run it again on any other machine. Furthermore, everything that runs in that environment is isolated from the underlying host (much like a virtual machine). And best of all, everything is fast and simple."

TL;DR, I just want a dev environment

@amokan
amokan / README.md
Last active August 29, 2015 14:02
inject-something.js

Steps to reproduce problem with ember-cli v0.0.32

  • Create a new project - ember new foo-app
  • Verify it runs/builds - ember server
  • Add inject-something.js into app/initializers
  • Try to run/build again - ember server
  • You should get a Error: Line 3: Unexpected token : output

Obviously the initializer above does nothing, but something changed between v0.0.28/29 and v0.0.32 related to this as all of my initializers cause build problems.

@amokan
amokan / README.md
Created August 17, 2014 23:20
setLED function

Calling setLED from the existing readADC() function where selector changes are detected. Clearly my port settings are wayyyy off.

if ( ( s | selector ) & 0x20 )
{
    int lastSelector = selector;
    selector = s >> 6;
    selector = selector < 15 ? selector : 15;
    if ( selector != lastSelector )
 {
### Keybase proof
I hereby claim:
* I am amokan on github.
* I am adammokan (https://keybase.io/adammokan) on keybase.
* I have a public key whose fingerprint is E59B 094F D816 6F54 786E D943 FAA4 B4B3 6EEE 2EA5
To claim this, I am signing this object:
@amokan
amokan / gist:d37cd34b91f9eefdc52e
Created May 6, 2015 19:15
firmata test with pressure sensor
import org.firmata.*;
import cc.arduino.*;
import processing.serial.*;
Arduino arduino;
int val = 0;
int currX = 0;
void setup() {
@amokan
amokan / Vagrantfile
Last active August 29, 2015 14:20
Vagrantfile that runs NSQ in a vagrant VM under docker
# -*- mode: ruby -*-
# vi: set ft=ruby :
BOX_NAME = ENV['BOX_NAME'] || 'phusion-open-ubuntu-14.04-amd64'
BOX_URI = ENV['BOX_URI'] || 'https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vbox.box'
VMWARE_BOX_URI = ENV['BOX_URI'] || 'https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vmwarefusion.box'
AWS_REGION = ENV['AWS_REGION']
AWS_AMI = ENV['AWS_AMI']
APPS = '/mnt/apps'
@amokan
amokan / mozzi_firmware
Created May 7, 2015 05:15
Mozmo Firmata/Processing Test
/*
* Firmata is a generic protocol for communicating with microcontrollers
* from software on a host computer. It is intended to work with
* any host computer software package.
*
* To download a host software package, please clink on the following link
* to open the download page in your default browser.
*
* http://firmata.org/wiki/Download
*/
@amokan
amokan / README.md
Last active August 29, 2015 14:22
Ruby script to fix ember-cli-blanket lcov.info for code-climate

Ruby script to fix ember-cli-blanket lcov.info for code-climate

Replace <app name here> with your ember-cli app name

I'm currently running this script as a post-build step during my CI process and it is working well.

My blanket-options file has the cliOptions set to the following:

cliOptions: {
@amokan
amokan / gist:213063
Created October 19, 2009 03:34 — forked from peterc/gist:40246
# NAME: authinabox
# VERSION: 1.01 (Dec 27, 2008)
# AUTHOR: Peter Cooper [ http://www.rubyinside.com/ github:peterc twitter:peterc ]
# DESCRIPTION: An "all in one" Sinatra library containing a User model and authentication
# system for both session-based logins OR HTTP Basic auth (for APIs, etc).
# This is an "all in one" system so you will probably need to heavily tailor
# it to your own ideas, but it will work "out of the box" as-is.
# COMPATIBILITY: - Tested on 0.3.2 AND the latest rtomayko Hoboken build! (recommended for the latter though)
# - NEEDS DataMapper!
# - Less work needed if you use initializer library -- http://gist.github.com/40238
@amokan
amokan / .gitignore
Created November 13, 2009 15:41
.gitignore file I use for VS2008 C# projects
obj
bin
*.user
*.suo
*.cache
*.scc
*.vssscc
*.vspcc
*.bak
*.log