Key | Description |
---|---|
h | move cursor left |
j | move cursor down |
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
Ctrl+A |
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
module FactoryGirlHelper | |
def find_or_create(*args) | |
name = args.shift | |
clazz = nil | |
# convert from underscores String to camelcase Class | |
if name.is_a? Hash | |
name = name.first[0] | |
clazz = name.first[1].to_s.camelize.constantize |
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
Backbone.React = {} unless Backbone.React | |
Backbone.React.Base = {} unless Backbone.React.Base | |
### | |
Backbone React Base Mixin | |
========================= | |
Usage example: | |
-------------- |
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
matchdata = "121,32 Std.".match(/([\d]+[\,|\.]?\d{0,2})+\s?(\w.*)?/) | |
matchdata[1] # => "121,32" | |
matchdata[2] # => "Std." | |
matchdata[0] # => "121,32 Std." |
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 hello = "Hello Hias!"; | |
console.log(hello); |
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 React, {PropTypes} from 'react'; | |
import {connect} from 'react-redux'; | |
import {bindActionCreators} from 'redux'; | |
import TodoActions as actions from '../actions'; | |
import TodoList from '../components/TodoList'; | |
// This is for POJO | |
import { query } from '../utils/helpersPojo' | |
// Uncomment this is for Immutable.js |
References:
- Create a new Droplet on DigitalOcean
- Name the Droplet after your Domain (yourdomain.com)
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
#! /bin/bash | |
RED='\033[0;31m' | |
YELLOW='\033[1;33m' | |
NC='\033[0m' # No Color | |
FILE_TYPES="\.(erb|html|haml|rb|js|jsx|cjsx)" | |
CLASSES_PREFIX="class(Name)?=[\"\'](.*\s)?" | |
SELECTORS=( |
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
// Foundation Grid | |
// | |
// A Sticky used on canvases | |
// | |
// Markup: | |
// <div class="row"> | |
// <div class="small-2 large-4 columns"><div class="kss-example-component">...</div></div> | |
// <div class="small-4 large-4 columns"><div class="kss-example-component">...</div></div> | |
// <div class="small-6 large-4 columns"><div class="kss-example-component">...</div></div> | |
// </div> |
OlderNewer