- Create a gist if you haven't already.
- Clone your gist:
# make sure to replace `<hash>` with your gist's hash git clone https://gist.github.com/<hash>.git # with https git clone [email protected]:<hash>.git # or with ssh
This file contains hidden or 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
| #include <FastLED.h> | |
| // fadeTowardColor example code. | |
| // | |
| // Sample code that includes a function for fading one RGB color toward a target RGB color | |
| // Also includes a function for fading a whole array of pixels toward a given color | |
| // | |
| // Both of these functions _modify_ the existing color, in place. | |
| // | |
| // All fades are done in RGB color space. |
Version Number might change!! The versions of all softwares mentioned here, including Cassandra will change as newer versions are launched.
Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:
This file contains hidden or 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 React from "react"; | |
| import { render } from "react-dom"; | |
| const ParentComponent = React.createClass({ | |
| getDefaultProps: function() { | |
| console.log("ParentComponent - getDefaultProps"); | |
| }, | |
| getInitialState: function() { | |
| console.log("ParentComponent - getInitialState"); | |
| return { text: "" }; |
This file contains hidden or 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
| var debug = process.env.NODE_ENV !== "production"; | |
| var webpack = require('webpack'); | |
| module.exports = { | |
| context: __dirname, | |
| devtool: debug ? "inline-sourcemap" : null, | |
| entry: "./js/scripts.js", | |
| output: { | |
| path: __dirname + "/js", | |
| filename: "scripts.min.js" |
Mongoid 5 is a major upgrade to Mongoid for several reasons :
- Moped is not used anymore. The driver is the brand new official MongoDB ruby driver 2.0
- Mongoid is now officialy maintained by Mongodb
Here is a non comprehensive list of things to chexk or upgrade.
- Mongoid.yml. The driver changes, so the options you pass to mongoid.yml also do. You should generate a brand new one and find the equivalent options you were using. The
sessionsentry has been replaced by theclientsentry. - Aggregation. User.collection.aggregate now requires an array as argument, not a variable number of hashes
Moped::classes likeErrorsorBSONdon't exist anymore.
This file contains hidden or 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
| #!/bin/bash | |
| mkdir my-app && cd $_ | |
| # https://github.com/yeoman/generator-polymer | |
| npm install -g generator-polymer | |
| yo polymer | |
| gulp |
This file contains hidden or 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
| // Promise.all is good for executing many promises at once | |
| Promise.all([ | |
| promise1, | |
| promise2 | |
| ]); | |
| // Promise.resolve is good for wrapping synchronous code | |
| Promise.resolve().then(function () { | |
| if (somethingIsNotRight()) { | |
| throw new Error("I will be rejected asynchronously!"); |
This file contains hidden or 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 install gh-pages --save-dev | |
| var ghpages = require('gh-pages'); | |
| gulp.task('deploy', ['default'], function(cb) { | |
| ghpages.publish(path.join(process.cwd(), 'dist'), cb); | |
| }); |
