A Pen by Kazuhito Hokamura on CodePen.
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
/** @test {MyClass} */ | |
describe('MyClass', () => { | |
/** @test {MyClass#foo} */ | |
describe('MyClass#foo', () => { | |
it('should be ...'); | |
}); | |
/** @test {MyClass#bar} */ | |
describe('MyClass#bar', () => { | |
it('should be ...'); |
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
source 'https://rubygems.org' | |
ruby '2.2.3' | |
gem 'rails' | |
gem 'omniauth' | |
gem 'omniauth-google-oauth2' | |
gem 'omniauth-github' | |
gem 'omniauth-twitter' |
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
0 info it worked if it ends with ok | |
1 verbose cli [ '/Users/hokamura/node/bin/node', | |
1 verbose cli '/Users/hokamura/node/bin/npm', | |
1 verbose cli 'link' ] | |
2 info using [email protected] | |
3 info using [email protected] | |
4 verbose node symlink /Users/hokamura/node/bin/node | |
5 verbose linkPkg /Users/hokamura/tmp/20150326-100731/mypackage | |
6 verbose gentlyRm vacuuming /Users/hokamura/node/lib/node_modules/mypackage | |
7 verbose gentlyRm vacuuming /Users/hokamura/node/lib/node_modules/mypackage |
やりたいこと
- 親側の変更を子のComponentに伝えたい
- 子にどうやって渡したらいいのかわからな
- イベント/ハンドラもどうやって渡せばいいのか
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 connect = require('connect'); | |
var http = require('http'); | |
var serveStatic = require('serve-static'); | |
var stubcell = require('stubcell-middleware'); | |
var app = connect(); | |
app.use(serveStatic('public', { index: ['index.html']})); | |
app.use('/api', stubcell('example.yaml')); | |
app.listen(3000); |
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 http = require('http'); | |
http.createServer(function(req, res) { | |
var data = ''; | |
req.on('data', function(chunk) { | |
data += chunk; | |
}); | |
req.on('end', function() { | |
console.log(data); //=> 'foo!' |
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
$ ruby -e 'C=`stty size`.scan(/\d+/)[1].to_i;S="\xf0\x9f\x8d\xa3";a={};puts "\033[2J";loop{a[rand(C)]=0;a.each{|x,o|;a[x]+=1;print "\033[#{o};#{x}H \033[#{a[x]};#{x}H#{S} \033[0;0H"};$stdout.flush;sleep 0.01}' |
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 request = require('request'); | |
var targetUrl = 'https://www.aeonnetshop.com/shop/goods/goods.aspx?goods=010500000050104901111122871'; | |
request.get({ url: targetUrl, jar: true }, function(err, res, body) { | |
console.log(body); | |
}); |
Embedded Documentsの場合はDocumentに配列とかでも持つから同期的に子要素を取得できる。
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
// commentsをEmbedded Documentsにするパターン
var Blog = new Schema({
title: String,
body: String,