-
This is a numbered list.
-
I'm going to include a fenced code block as part of this bullet:
Code More Code
function readDir(start, callback) { | |
// Use lstat to resolve symlink if we are passed a symlink | |
fs.lstat(start, function(err, stat) { | |
if(err) { | |
return callback(err); | |
} | |
var found = {dirs: [], files: []}, | |
total = 0, | |
processed = 0; | |
function isDir(abspath) { |
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
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" |
[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
#!/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" |
TransitionDrawable transition = (TransitionDrawable) view.getBackground(); | |
if (toggle) { | |
view.startTransition(1200); | |
} else { | |
view.reverseTransition(1200); | |
} |
isProdEnv = function () { | |
if (process.env.ROOT_URL == "http://localhost:3000") { | |
return false; | |
} else { | |
return true; | |
} | |
} | |
Accounts.loginServiceConfiguration.remove({ | |
service: 'google' |
/** | |
* Example : | |
* var a = [2,7,9]; | |
* binaryInsert(8, a); | |
* | |
* It will output a = [2,7,8,9] | |
* | |
*/ | |
function binaryInsert(value, array, startVal, endVal){ |
/* | |
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 |