Skip to content

Instantly share code, notes, and snippets.

View davemo's full-sized avatar
😀

David Mosher davemo

😀
View GitHub Profile

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:

@davemo
davemo / app.coffee
Last active March 25, 2020 13:25
Got a .coffee file with JSX? Here's how you can transpile to .js with Reacts JSX parsed.
`/** @jsx React.DOM */`
converter = new Showdown.converter
Comment = React.createClass
render: ->
rawMarkup = converter.makeHtml @props.children.toString()
`<div className="comment">
<h2 className="comment">{this.props.author}</h2>
<span dangerouslySetInnerHTML={{__html: rawMarkup}} />
@davemo
davemo / app.coffee
Last active September 15, 2016 08:36
A .coffee file with Reacts JSX, compiles fine in Sublime Text using 'Coffee: Display JavaScript', but won't compile with the coffeescript CLI or the coffeeify transform for browserify. Relevant reading: http://blog.vjeux.com/2013/javascript/react-coffeescript.html and https://groups.google.com/forum/#!msg/reactjs/NHy6UNqm-zU/i6Xr0-jP7nIJ
`/** @jsx React.DOM */`
React = require("react")
$ = require("jquery-browserify")
converter = new Showdown.converter
Comment = React.createClass
render: ->
rawMarkup = converter.makeHtml @props.children.toString()