Skip to content

Instantly share code, notes, and snippets.

View dfmcphee's full-sized avatar

Dominic McPhee dfmcphee

View GitHub Profile
$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;
}
@dfmcphee
dfmcphee / Add sub-module to repo
Created September 14, 2014 22:03
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"
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 March 22, 2014 16:19
Simple Geddy translation
// 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 August 30, 2013 01:01
Sample nginx node proxy config
upstream yourapp_backend {
server 127.0.0.1:4000;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
@dfmcphee
dfmcphee / gist:4049266
Created November 10, 2012 00:44
Error from meteor deploy to nodejitsu
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