Skip to content

Instantly share code, notes, and snippets.

Kazuaki Nishizawa LightSpeedC

Block or report user

Report or block LightSpeedC

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@LightSpeedC
LightSpeedC / file0.txt
Last active May 1, 2019
React v15でカレンダーを作ってみた ref: https://qiita.com/LightSpeedC/items/8679c9d4069523b737ea
View file0.txt
平成29/2017年2月
日 月 火 水 木 金 土
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28
@LightSpeedC
LightSpeedC / 普通版の竹内関数.js
Last active Nov 27, 2016
竹内関数を遅延評価で高速化してみた(JavaScript/Node.js/ES2015/ES6) ref: http://qiita.com/LightSpeedC/items/304c4bb1d2ea3381a446
View 普通版の竹内関数.js
'use strict';
// tarai(x: number, y: number, z: number): number;
const tarai = (x, y, z) => x <= y ? y :
tarai(tarai(x - 1, y, z),
tarai(y - 1, z, x),
tarai(z - 1, x, y));
bench('takeuchi tarai', tarai, 10, 5, 0);
bench('takeuchi tarai', tarai, 12, 6, 0);
@LightSpeedC
LightSpeedC / file0.txt
Last active Nov 27, 2016
React v15をやってみよう (1) - まずはHTMLだけで ref: http://qiita.com/LightSpeedC/items/484fec44a2ca15e48f49
View file0.txt
$ node -v
v6.x.x
$ npm -v
v3.x.x
@LightSpeedC
LightSpeedC / file0.js
Created Oct 10, 2016
argumentsオブジェクトを配列(Array)にする方法 ref: http://qiita.com/LightSpeedC/items/5cf07f94b051d0a8d4f1
View file0.js
Object.setPrototypeOf(arguments, Array.prototype);
// または
arguments.__proto__ = Array.prototype;
@LightSpeedC
LightSpeedC / express-app1.js
Last active Feb 8, 2018
[Node.js] 簡単なWebサーバとして静的ファイル配信/ディレクトリ一覧機能のサンプルコード ref: https://qiita.com/LightSpeedC/items/d2793e9d213e767a8dc8
View express-app1.js
'use strict';
require('express')()
.use(require('express').static('.'))
.use(require('serve-index')('.', {icons: true}))
.listen(process.env.PORT || 3000);
@LightSpeedC
LightSpeedC / index.js
Last active Aug 7, 2016
WebだけでGitHubからHerokuに空っぽのWebサービスを立ち上げてみた(Node.js) ref: http://qiita.com/LightSpeedC/items/2751b705068449ab37ed
View index.js
require('http').createServer((req, res) => res.end('hello')).listen(process.env.PORT || 3000);
View zundo-kiyoshi.js
// ズンズンズンズンドコキ・ヨ・シ!
void function () {
'use strict';
var phrase = 'ズンズンズンズンドコ';
var puts = typeof process === 'object' && process &&
typeof process.stdout === 'object' && process.stdout &&
typeof process.stdout.write === 'function' ?
@LightSpeedC
LightSpeedC / es-next-async-await-ex.js
Last active Oct 25, 2017
ES2017 async/await + Promise で解決できる事、とES2015(ES6) generators (yield) + Promise + npm aa (async-await) で解決できる事 ref: http://qiita.com/LightSpeedC/items/95e3db59276e5d1d1a0d
View es-next-async-await-ex.js
'use strict';
require('babel-polyfill'); // おまじない
//require('regenerator').runtime();
console.log('main: start');
main().then(function (val) {
console.log('main: finish:', val);
});
@LightSpeedC
LightSpeedC / excel-app.html
Last active Sep 7, 2015
Mithril.js 試してみた(5) Excelの様な表計算アプリを3時間で作る m.component() ref: http://qiita.com/LightSpeedC/items/c19677822f896adc43d9
View excel-app.html
<!DOCTYPE html>
<meta charset="UTF-8">
<title>Excel example - Mithril.js</title>
<script src="/js/mithril.min.js"></script>
<!--[if IE]><script src="/js/es5-shim.min.js"></script><![endif]-->
<body>
<div id="$excelElement"></div>
</body>
@LightSpeedC
LightSpeedC / todo-app.html
Last active Nov 23, 2015
Mithril.js 試してみた(4) todo アプリのフロント側まで ref: http://qiita.com/LightSpeedC/items/c3026847dc5809d2a7a9
View todo-app.html
<!DOCTYPE html>
<meta charset="UTF-8">
<title>ToDo App - Mithril.js</title>
<script src="mithril.min.js"></script>
<!--[if IE]><script src="es5-shim.min.js"></script><![endif]-->
<body>
<table>
<tr valign="top">
You can’t perform that action at this time.