Skip to content

Instantly share code, notes, and snippets.

View kkeeth's full-sized avatar
🎨
riotjs book in japanese publish!!

Keeth Kuwahara kkeeth

🎨
riotjs book in japanese publish!!
View GitHub Profile
@kkeeth
kkeeth / Bind_demo.js
Last active April 4, 2017 01:15
JavaScriptに関するスニペット一覧
(function() {
var app = { name: 'fuga' };
// bindパターン1
var t = document.getElementById('hoge');
t.addEventListener('click', function(ev) {
console.log(ev.target.tagName); // DIV
console.log(this); // fuga
}.bind(app));
@kkeeth
kkeeth / complex_function.js
Last active July 31, 2016 13:40
複素関数をプログラムで実装
// define complex number
var Complex = (function () {
function Complex(x, y) {
this.x = x;
this.y = y;
}
return Complex;
}());
// adding
var addc = function (z, w) {
@kkeeth
kkeeth / tasks2017.md
Last active May 16, 2017 06:00
2017年にやることリスト

2017年に学びたい技術、読んでみたい本、完成させるGitHubリポジトリなどをピックアップ。
随時追加・更新する予定。 ※最終更新日:2017/05/02

Technology

技術名 進捗 備考
ディープラーニング 未着手
(ざっくり)デザインの理論 未着手
(ざっくり)経営論 未着手
Node.js 進行中 CLIアプリ作成済みSocket.ioを使ったwebアプリ作成中
@kkeeth
kkeeth / vicommands.txt
Last active January 20, 2017 01:45
viコマンド集
/* ****************************************************
* Useful vi Commands
* 使える便利なviコマンド集
*
* Update :
* :
******************************************************/
http://www.crimson-snow.net/tips/unix/vim.html
@kkeeth
kkeeth / snipets_for_php.php
Last active April 4, 2017 02:46
PHPのスニペット
<?php
// 変数内の改行コードを空白に変更
$text = str_replace(array("\r\n","\r","\n"), ' ', $text);
// 正規表現での整数チェック
preg_match("/^[+-]?[0-9]+$/", $check, $result);
@kkeeth
kkeeth / js_bind_demo.js
Last active April 13, 2017 09:37
JavaScript質問会サンプル集
/** bind関数のサンプル **/
/** サンプル1(thisを束縛) **/
var context = function() {
console.info(this)
}
context() // Window
var obj = {
x: 123,
y: 'hoge'
@kkeeth
kkeeth / gulpfile.js
Last active June 13, 2017 07:39
ES6(ES2015)用のサンプル集
/** gulpの設定例 **/
const gulp = require("gulp"),
buble = require("gulp-buble")
gulp.task('buble', () => {
gulp.src('./es6/*.js')
.pipe(buble())
.pipe(gulp.dest('./js/'))
});

目にした、耳にしたけど頭に入っていないワードのメモ。頭に入ったものにチェックを付ける。

  • LGTM(Look Good To Me)
  • FYI(For Your Information)
  • DRY(Don't Repeat Yourself)原則
    • 重複したコードを書かないこと。
    • その考えに基づいて設計すること。
      • 適用範囲はコードだけではない。
  • KISS(Keep It Simple, Stupid)の原則
  • YAGNI(You Aren't Going to Need It)
@kkeeth
kkeeth / .vimrc
Created May 15, 2017 06:47
オレオレvimrcの設定
"#######################
" 表示系
"#######################
" set number "行番号表示
set showmode "モード表示
set title "編集中のファイル名を表示
set ruler "ルーラーの表示
set showcmd "入力中のコマンドをステータスに表示する
set showmatch "括弧入力時の対応する括弧を表示