Skip to content

Instantly share code, notes, and snippets.

@davemo
davemo / haml2erb.md
Created Jan 30, 2019
Convert HAML to ERB across a folder on Mac OS
View haml2erb.md

steps

  1. install herbalizer somewhere on your PATH, i put mine in ~/bin

cd ~/bin && wget http://openmbta.org/herbalizer && chmod +x herbalizer

  1. do a dry run to see if your renames look ok

find . -name '*haml' | xargs ruby -e 'ARGV.each { |i| puts "herbalizer < #{i} > #{i}.erb" }'

@davemo
davemo / deconstruct-2018-takeaways.md
Last active May 29, 2018
I have a list of short takeaways from each talk that capture the most valuable lesson for me.
View deconstruct-2018-takeaways.md

Allison Parrish: There is great beauty in applying scientific concepts (interpolation) and the scientific method to domains that we wouldn't normally think to (syntax, grammar, poetry).

Anjana Vakil: Language matters, and has historically evolved to meet the needs of its speakers; we need to be better at helping the language in the domain of computing evolve beyond where it is currently being held back.

Augie Fackler: API design can (and should) be decoupled from API implementation; this decoupling can provide a valuable articulation point that yields flexibility in the right areas without compromising on principles.

Elle Vargas: We need to embrace the technical neophytes (or Juniors) mindset in our organizations, because they are best equipped to bridge the gap between people with little to no technical background and experts; failure to do this leads to security compromises on the scale of the manipulation of democracy.

Gary Bernhardt: The technical community needs to be aware of the altruisti

@davemo
davemo / forward-js-talk-notes.md
Last active Apr 25, 2018
My Notes for talks from ForwardJS Ottawa 2018
View forward-js-talk-notes.md

ForwardJS Ottawa, April 4/5, 2018

Essentialism

Andy Mockler (@asmockler), Shopify Analytics Team, Chicago

inspirational sources:

  • book: Essentialism by Greg McKeown

key concepts:

  • essentialism is about getting the right things done
View keybase.md

Keybase proof

I hereby claim:

  • I am davemo on github.
  • I am dmosher (https://keybase.io/dmosher) on keybase.
  • I have a public key ASAjl7nZA81gfQd-iomz3uGBjmQfBlYnEOEnehGNxILLGgo

To claim this, I am signing this object:

@davemo
davemo / bump.sh
Created Apr 12, 2017
bumps versions, tags and pushes with git
View bump.sh
#!/bin/bash
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3"
NOW="$(date +'%B %d, %Y')"
RED="\033[1;31m"
GREEN="\033[0;32m"
YELLOW="\033[1;33m"
@davemo
davemo / Makefile
Last active Apr 12, 2017
makefile with helpful default targets!
View Makefile
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 Mar 22, 2017
nodenv exits with a 1 value with vanilla docker image with missing deps
View Dockerfile
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
View hots-map-breakdown.md

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 Jan 12, 2016
A mythical language that doesn't exist, that is whitespace aware emmet/zencoding
View login.emmet
#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 Aug 28, 2019
Ottawa-JS-Dev-JavaScript-Panel
View ottawa.js.panel.questions.feb.11.2015.md

Ottawa JS, February 11, 2015

Your best advice for people getting started in JavaScript:

Dan:

The Other Simon:

You can’t perform that action at this time.