#Docker on GCE see:
##Instantiate a docker VM
- install gcutil/gcloud (see here: https://developers.google.com/compute/docs/gcutil/)
- gcloud auth login
#Docker on GCE see:
##Instantiate a docker VM
/* | |
This example shows how you can use your data structure as a basis for | |
your Firebase security rules to implement role-based security. We store | |
each user by their Twitter uid, and use the following simplistic approach | |
for user roles: | |
0 - GUEST | |
10 - USER | |
20 - MODERATOR |
/** | |
* Example : | |
* var a = [2,7,9]; | |
* binaryInsert(8, a); | |
* | |
* It will output a = [2,7,8,9] | |
* | |
*/ | |
function binaryInsert(value, array, startVal, endVal){ |
isProdEnv = function () { | |
if (process.env.ROOT_URL == "http://localhost:3000") { | |
return false; | |
} else { | |
return true; | |
} | |
} | |
Accounts.loginServiceConfiguration.remove({ | |
service: 'google' |
TransitionDrawable transition = (TransitionDrawable) view.getBackground(); | |
if (toggle) { | |
view.startTransition(1200); | |
} else { | |
view.reverseTransition(1200); | |
} |
#!/bin/bash | |
set -x | |
MUSIC=(~/Music/Africando\ -\ All\ Stars\ Betece/*mp3) | |
START="$(date +%s -d 'tomorrow 08:00')" | |
#START="$(date '+%s' -d '+ 5 minutes')" | |
STOP="$(date '+%s' -d 'tomorrow 19:00')" | |
sudo sh -c "echo 0 > /sys/class/rtc/rtc0/wakealarm" | |
sudo sh -c "echo $START > /sys/class/rtc/rtc0/wakealarm" |
[Jasmine][jas] is an excellent framework for JavaScript testing, but I had a tough time coaxing it into cooperation with the Chrome extension I was developing. Jasmine's default testrunner uses an inline script block that listens for window.onload
to setup the test environment, but Chrome prohibits extensions from running inline code. Alas, it's not as easy as importing the inline code as a separate file. After a little tinkering, this is what I came up with:
Extension
├── html
├── js
├── manifest.json
└── tests
├── jasmine
│ └── lib
│ └── jasmine-1.2.0
If: | |
- you add and commit with the wrong email address in git, and | |
- your remote has a hook set up to prevent you from pushing with the bad address | |
Then you need to amend the author of your commit before push can succeed: | |
1. fix your email address in git config: | |
$ git config user.name "Your Name" |
This totally happened, y'all can stop +1ing this now. GitHub Blog post. Direct link to settings where you can set this.
#Per-organization / per-repo email overrides - A feature suggestion
Here the concepts "organization" and "user" are interchangeable, I'm talking about an entity that owns a repo, whether it is jQuery or John Resig. I'll stick to using organization as it best represents my original use-case.
##TL;DR