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 Each(obj, fn) { | |
if (obj.length) for (var i = 0, ol = obj.length, v = obj[0]; i < ol && fn(v, i) !== false; v = obj[++i]); | |
else for (var p in obj) if (fn(obj[p], p) === false) break; | |
} |
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
propTypes: { | |
// You can declare that a prop is a specific JS primitive. By default, these | |
// are all optional. | |
optionalArray: React.PropTypes.array, | |
optionalBool: React.PropTypes.bool, | |
optionalFunc: React.PropTypes.func, | |
optionalNumber: React.PropTypes.number, | |
optionalObject: React.PropTypes.object, | |
optionalString: React.PropTypes.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
require Logger | |
Logger.info "path: " <> inspect(conn.params["paths"]) |
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
SampleElixirEctoSelect.Repo.start_link | |
alias SampleElixirEctoSelect.RssFeed | |
Enum.map 0..99, | |
fn _ -> | |
params = %{ | |
feed_url: Faker.Internet.url, | |
title: Faker.Commerce.product_name, | |
subtitle: Faker.Company.bs, |
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
console.debug("%O", obj) |
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
mix ecto.gen.migration add_posts_table |
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
mix phoenix.gen.json UserAuth user_auths email:string encrypted_password:string password:string 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
defmodule GooglePlaces do | |
@moduledoc false | |
# https://developers.google.com/places/web-service/?hl=ja | |
use HTTPoison.Base | |
#require Logger | |
@text_search "/textsearch/json?key=<api key>" |
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
- |
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
# model | |
rails g model Company --no-migration -t rspec | |
# controller (page) | |
rails g controller Rules -t rspec | |
# scaffold | |
rails generate scaffold Plan -t rspec |
OlderNewer