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
require 'typhoeus' | |
require 'json' | |
STATUSES = { | |
0 => 'Pending', | |
1 => 'Deployed', | |
2 => 'Deployment failed', | |
3 => 'Analyzing', | |
4 => 'Analyzed', | |
5 => 'Queued for deployment', |
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
US_STATES = { | |
'AK' => { name: 'Alaska', location_id: 21132 }, | |
'AL' => { name: 'Alabama', location_id: 21133 }, | |
'AR' => { name: 'Arkansas', location_id: 21135 }, | |
'AS' => { name: 'American Samoa', location_id: 2016 }, | |
'AZ' => { name: 'Arizona', location_id: 21136 }, | |
'CA' => { name: 'California', location_id: 21137 }, | |
'CO' => { name: 'Colorado', location_id: 21138 }, | |
'CT' => { name: 'Connecticut', location_id: 21139 }, | |
'DC' => { name: 'District of Columbia', location_id: 21140 }, |
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
/** @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 |