A Pen by Eric Berry on CodePen.
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
| /** @jsx React.DOM */ | |
| var React = require('react') | |
| , mui = require('material-ui') | |
| , { TextField } = mui | |
| , $ = require('jquery'); | |
| require('jquery.inputmask'); | |
| var MaskedTextField = React.createClass({ |
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 webpack = require('webpack'); | |
| module.exports = { | |
| entry: './client_app/main.js', | |
| output: { | |
| filename: './app/assets/javascripts/bundle.js' | |
| }, | |
| module: { | |
| loaders: [ | |
| {test: /\.less$/, loader: 'style-loader!css-loader!less-loader'}, |
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
| def state_hash | |
| {"Alabama" => "AL", | |
| "Alaska" => "AK", | |
| "Arizona" => "AZ", | |
| "Arkansas" => "AR", | |
| "California" => "CA", | |
| "Colorado" => "CO", | |
| "Connecticut" => "CT", | |
| "Delaware" => "DE", | |
| "District of Columbia" => "DC", |
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 React = require('react'); | |
| var ${NAME} = React.createClass({ | |
| render: function() { | |
| return ( | |
| <div className="${NAME}"> | |
| </div> | |
| ) | |
| } | |
| }); |
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 EventEmitter = require('events').EventEmitter | |
| , mergeInto = require('react/lib/mergeInto'); | |
| function createStore(initialState) { | |
| var events = new EventEmitter(); | |
| var state = initialState || {}; | |
| return { | |
| setState: function(newState) { |
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
| require 'oauth' | |
| require 'httpclient' | |
| require 'json' | |
| class SimpleTwitter | |
| def initialize(config) | |
| @config = config | |
| @http_client = HTTPClient.new | |
| end |
Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
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
| // BASE SETUP | |
| // ============================================================================= | |
| // call the packages we need | |
| var express = require('express'); // call express | |
| var app = express(); // define our app using express | |
| var bodyParser = require('body-parser'); // allows parsing of post params | |
| var request = require('request'); // enable performing http requests | |
| // configure app to use bodyParser() |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Angular Casts</title> | |
| <%= stylesheet_link_tag "application", media: "all" %> | |
| <%= csrf_meta_tags %> | |
| </head> | |
| <body> | |
| <%= yield %> |