{{ message }}

Instantly share code, notes, and snippets.

💭

Taka Okunishiokunishinishi

💭

Last active Oct 31, 2018
Webページの認証を1行の記述だけでやってみる ref: https://qiita.com/okunishinishi@github/items/7353cd3d7f2cdae7ff4f
View file0.txt
 (prompt('合言葉は？') !== 'たこやき') && document.write('だめだこりゃ')
Last active Mar 4, 2019

View file0.js
 const shuffle = require('shuffle-array') function defineMembers (memberCount = 10) { const men = shuffle(new Array(memberCount).fill(null).map((_, i) => ({ name: `man#\${i}`, rejectedBy: [], // 自分を拒否した異性の名前 likes: [], // 好みの異性 }))) const women = shuffle(new Array(memberCount).fill(null).map((_, i) => ({ name: `woman#\${i}`,
Last active Nov 27, 2017
Gale–Shapley algorithm for Stable marriage problem
View gs-example01.js
 #!/usr/bin/env node /** * Gale–Shapley algorithm for Stable marriage problem * * https://en.wikipedia.org/wiki/Stable_marriage_problem * http://toyokeizai.net/articles/-/11584 */ 'use strict'
Last active May 9, 2017
Reduxを使ってちゃんとしたアプリをちゃんと作るのがあまりに面倒なんでなんとかしてなんとかする方法を模索してみた ref: http://qiita.com/okunishinishi@github/items/5c4860d3be8cbcc59286
View file0.js
 function createCounterWithNamedType(counterName = '') { return function counter(state = 0, action) { switch (action.type) { case `INCREMENT_\${counterName}`: return state + 1; case `DECREMENT_\${counterName}`: return state - 1; default: return state; }
Last active Apr 17, 2017
[SUGOS] チュートリアル07 - Hubを冗長化する ref: http://qiita.com/okunishinishi@github/items/1fbd70b315fc1baae34c
View file0.txt
 mkdir sugos-tutorial-06 cd sugos-tutorial-06 npm init -y
Last active Apr 17, 2017
[SUGOS] チュートリアル06 - Observerを使ってみる ref: http://qiita.com/okunishinishi@github/items/256e997d124abf527bb2
View file0.txt
 mkdir sugos-tutorial-06 cd sugos-tutorial-06 npm init -y
Last active Feb 13, 2017
[SUGOS] チュートリアル05 - ActorやCallerを認証する ref: http://qiita.com/okunishinishi@github/items/b981528e91b31d4c42dc
View file0.txt
 mkdir sugos-tutorial-05 cd sugos-tutorial-05 npm init -y
Last active Feb 13, 2017
[SUGOS] チュートリアル04 - Moduleをnpmパッケージ化する ref: http://qiita.com/okunishinishi@github/items/2c5f4f5fbd57fbb7c3e2
View file0.txt
 # Install as global module npm install -g sugo-scaffold # Show version to check if the installation succeeded sugo-scaffold --version
Last active Feb 7, 2017
[SUGOS] チュートリアル03 - Browser間でやり取りする ref: http://qiita.com/okunishinishi@github/items/52206755d6fb0d3e844e
View file0.txt
 mkdir sugos-tutorial-03 cd sugos-tutorial-03 npm init -y
Last active Feb 7, 2017
[SUGOS] チュートリアル02 - Event Emitしてみる ref: http://qiita.com/okunishinishi@github/items/a25e5b89cf7505302b13
View file0.txt
 mkdir sugos-tutorial-02 cd sugos-tutorial-02 npm init -y
You can’t perform that action at this time.