:tabe - open file in new tab
:e - open file
,t - find a file in directory
cmd+shift+n - open NerdThree
ctrl+(h,j,k,l): navigation in screen
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
// ================================================================================================ | |
// | |
// Components » <%= font_name.capitalize.gsub(/-/, ' ') %> | |
// | |
// ================================================================================================ | |
<%= font_face(:rails).gsub(/"\//, '"') %> | |
[class*="icon-"] { | |
display: inline-block; |
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
var gulp = require('gulp'), | |
pkg = require('./package.json'), | |
path = require('path'), | |
connect = require('connect'), | |
http = require('http'), | |
open = require('open'), | |
compass = require('gulp-compass'), |
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
'use strict'; | |
var mongoose = require('mongoose'), | |
timestamp = require('timestamp'), | |
Schema = mongoose.Schema, | |
ObjectId = Schema.Types.ObjectId; | |
var ModelSchema = new Schema({ | |
name: { type: String } | |
}); |
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
var async = require('async'); | |
var Product = require('../model/Product'); | |
var Category = require('../model/Category'); | |
var Attribute = require('../model/Attributes'); | |
// bad idea | |
exports.index = function() { | |
Product.find(function(err, products) { | |
Category.find(function(err, categories) { | |
Attribute.find(function(err, attributes) { |
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
/* file path: ./views/Posts */ | |
'use strict'; | |
var React = require('react'); | |
var PostIndex = React.createClass({ | |
render: function() { | |
var posts = this.props.posts.map(function(post, index) { | |
return ( |
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
/** @jsx React.DOM */ | |
var TodoAdd = React.createClass({displayName: 'TodoAdd', | |
getInitialState: function() { | |
return { text: '' }; | |
}, | |
changeText: function(e) { | |
this.setState({ text: e.target.value }); | |
e.preventDefault(); | |
}, |
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
/* | |
* Function that calculate the average of a number | |
* | |
* @param {Number} num | |
* @param {Number} divisor | |
* @return {Number} simple arithmetic average of num | |
* | |
*/ | |
var calcAverage = (num, divisor) => (num / divisor).toFixed(2); |