Print the Fibonacci series (the first 10 values) separated by spaces. If you've ever taken a Computer Science class, you should be all over this one.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this would be set in a closure | |
// but leave some values to be cached (ie not created every function call) | |
// and the ability to override | |
var norm_regex = /\s+/g; | |
var norm_replace = "_"; | |
function normalize( val, reg_pattern, separator ) { | |
// convert to string | |
var norm_val = val+""; | |
norm_regex = reg_pattern || norm_regex; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm ls --depth 0 -g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set Up Launch Agent to Run On Startup | |
function set_launch_agent() { | |
# retrieve the dependency's prefix | |
DEP_PREFIX=$(brew --prefix ${1}) | |
# make the user local LaunchAgents directory (skip if already exists) | |
mkdir -p ~/Library/LaunchAgents | |
# copy brew generated plist to LaunchAgent | |
cp $DEP_PREFIX/*${1}*.plist ~/Library/LaunchAgents/ | |
# load the agent now | |
launchctl load -w ~/Library/LaunchAgents/*${1}*.plist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo chown -R `whoami` ~/.npm | |
sudo chown -R `whoami` /usr/local/lib/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.gold-standard { | |
background-color: #FFBC31; | |
} | |
.gold-standard .inner-ring { | |
background-color: #FFD700; | |
} | |
.badge-ribbon { | |
position: relative; | |
height: 100px; | |
width: 100px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Original source: https://gist.github.com/oskarrough/914653b03d886c015320 | |
* Modified fork: https://gist.github.com/consideRatio/761c6286158e70feaed7 | |
* | |
* Working authentication with | |
* Firebase 2.0.x + Ember.js 1.8.1 + Ember Data Canary + EmberFire 1.3.0 + Ember CLI | |
* works for me! oskar@rough.dk | |
* | |
* Note: this assumes you've set up login on your Firebase, | |
* only handles Google and Facebook for now. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
didInitAttrs() { | |
this._super(...arguments); | |
var value = this.get('value'); | |
if (value) { | |
console.log('initial value'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name '*.orig' -delete |
OlderNewer