Skip to content

Instantly share code, notes, and snippets.

View davemo's full-sized avatar
😀

David Mosher davemo

😀
View GitHub Profile
@davemo
davemo / Makefile
Last active April 12, 2017 21:04
makefile with helpful default targets!
VERSION ?= $(shell cat VERSION)
.PHONY: help version clean bump release
.DEFAULT_GOAL := help
build: ## build the app
do stuff
clean: ## clean artifacts
@davemo
davemo / Dockerfile
Created March 22, 2017 20:35
nodenv exits with a 1 value with vanilla docker image with missing deps
FROM ubuntu:xenial
MAINTAINER Test Double <dave@testdouble.com>
RUN apt-get -y update
RUN apt-get -y install git-core
ENV NODENV_ROOT /usr/local/lib/nodenv
RUN git clone https://github.com/nodenv/nodenv.git ${NODENV_ROOT}
RUN git clone https://github.com/nodenv/node-build.git ${NODENV_ROOT}/plugins/node-build
RUN git clone https://github.com/nodenv/nodenv-update.git ${NODENV_ROOT}/plugins/nodenv-update

HOTS Map Breakdowns

As transcribed by watching Dreadnaughts twitch breakdown here: http://www.twitch.tv/dreadnaught_heroes/v/46261889?t=01h35m19s

Towers of Doom

  • Medium/Large map (tri-lane)
  • Laning Phase: 1-1-3 (alternatively, 1-4 roaming mid/bot for 4)
    • Bottom lane prioritized: merc camps push bot lane and can get core shots
  • Top lane is safe lane
@davemo
davemo / login.emmet
Last active January 12, 2016 16:13
A mythical language that doesn't exist, that is whitespace aware emmet/zencoding
#login.row
.large-6.large-offset-3
form[ng-submit=login()]
fieldset.radius
.row
.large-6.columns
input[type=text name=username placeholder=username ng-model=credentials.username required]
.large-6.columns
input[type=password name=password placeholder=password ng-model=credentials.password required]
.row
@davemo
davemo / ottawa.js.panel.questions.feb.11.2015.md
Last active August 28, 2019 02:36
Ottawa-JS-Dev-JavaScript-Panel

Ottawa JS, February 11, 2015

Your best advice for people getting started in JavaScript:

Dan:

The Other Simon:

@davemo
davemo / hearthstone-card-downloader.js
Last active August 29, 2015 14:08
hearthstone-card-downloader.js
#!/usr/local/bin/node
var fs = require('fs');
var request = require('request');
var download = function(uri, filename, callback){
request.head(uri, function(err, res, body){
console.log('content-type:', res.headers['content-type']);
console.log('content-length:', res.headers['content-length']);
Customer = function() {
this.orders = [];
this.newOrder = function() {
var o = new Order(1);
this.orders.push(o);
return o;
};
};
Order = function(id) {
// Define a function greaterThan(n), that takes a value and returns a predicate
// which returns truthy if that value is greater than n.
var greaterThan = function(n) {
return function(value) {
return value > n;
};
};
var greaterThanFour = greaterThan(4);
:: NOTE needs to be elevated
@set /p HTTP_PORT=Enter Port number [e.g. 10082]:
netsh http add urlacl url=http://*:%HTTP_PORT%/ user=everyone
netsh http add urlacl url=http://localhost:%HTTP_PORT%/ user=everyone
netsh http add urlacl url=http://%COMPUTERNAME%:%HTTP_PORT%/ user=everyone
netsh http add urlacl url=http://%COMPUTERNAME%.local:%HTTP_PORT%/ user=everyone
@pause

Keybase proof

I hereby claim:

  • I am davemo on github.
  • I am dmosher (https://keybase.io/dmosher) on keybase.
  • I have a public key whose fingerprint is 6F2F 6F48 0EC7 52E2 53BC 9D4F 7C7C 5A41 C6BC A722

To claim this, I am signing this object: