Skip to content

Instantly share code, notes, and snippets.

Dominic McPhee dfmcphee

Block or report user

Report or block dfmcphee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:fb6b3efe0fd67bafffe18ee0108241a2
$height: rem(20px);
$horizontal-padding: ($height / 2);
$pip-size: rem(10px);
$pip-spacing: ($height - $pip-size) / 2;
@mixin pip-color($color) {
.Polaris-Badge__Pip {
color: $color;
}
View Add sub-module to repo
git rm --cached submodule_path # delete reference to submodule HEAD (no trailing slash)
git rm .gitmodules # if you have more than one submodules,
# you need to edit this file instead of deleting!
rm -rf submodule_path/.git # make sure you have backup!!
git add submodule_path # will add files instead of commit reference
git commit -m "remove submodule"
View gist:579438a427f08f5df162
var xmlhttp=new XMLHttpRequest();
var url = "http://poy.tsn.ca/api/tournaments/1/matches/17-hemsky-vs-oshie/vote/left";
window.setInterval(function(){
xmlhttp.open("POST", url, true);
xmlhttp.send();
}, 1000);
@dfmcphee
dfmcphee / gist:9709696
Created Mar 22, 2014
Simple Geddy translation
View gist:9709696
// In /foo/bar/es-mx.json
{
"Welcome to my site.": "Bienvenidos a mi sitio."
}
// In a controller (assuming a defaultLocale of 'es-mx'):
// Returns Bienvenidos a mi sitio.
this.i18n.t('Welcome to my site.');
@dfmcphee
dfmcphee / gist:6385255
Created Aug 30, 2013
Sample nginx node proxy config
View gist:6385255
upstream yourapp_backend {
server 127.0.0.1:4000;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
@dfmcphee
dfmcphee / gist:4049266
Created Nov 10, 2012
Error from meteor deploy to nodejitsu
View gist:4049266
server:bundle dom$ jitsu deploy
info: Welcome to Nodejitsu nko3-breakfast-club
info: jitsu v0.11.0, node v0.8.9
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in node server/server.js
info: Creating snapshot 0.0.0-2
info Uploading: [=============================] 99%
info: Updating app nko3-breakfast-club
info: Activating snapshot 0.0.0-2 for nko3-breakfast-club
You can’t perform that action at this time.