Skip to content

Instantly share code, notes, and snippets.

@yoshikazusawa
yoshikazusawa / file0.txt
Last active August 29, 2015 13:59
Perlでミリ秒単位の時間計測を行う(Time::HiResを利用) ref: http://qiita.com/yoshikazusawa/items/b275104ffe869fa76157
use strict;
use warnings;
use utf8;
use feature qw( say );
binmode(STDOUT, ":utf8");
use Time::HiRes qw( usleep gettimeofday tv_interval );
# 現在時刻を取得([currentsec, currentmicrosec]の構造になっている)
my $t0 = [gettimeofday];
@yoshikazusawa
yoshikazusawa / javascript_resources.md
Created March 20, 2014 06:40 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@yoshikazusawa
yoshikazusawa / 0_reuse_code.js
Created March 20, 2014 06:40
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@yoshikazusawa
yoshikazusawa / file0.txt
Created February 2, 2014 10:31
tigとGitHubを連携させる幾つかのカスタムキーバインド ref: http://qiita.com/yoshikazusawa/items/a8812e2dc736f7f967bb
# リポジトリのGitHubを表示
bind generic ^ !@hub browse
# issuesを表示
bind generic - !@hub browse -- issues
# 選択したcommitをGitHubで表示
bind generic ~ !@hub browse -- commit/%(commit)
# 選択したcommitのci-statusを確認
@yoshikazusawa
yoshikazusawa / file0.txt
Created January 31, 2014 13:17
tigカスタムキーバインド紹介(mainビューとbranchビュー編) ref: http://qiita.com/yoshikazusawa/items/c3eb0e299e6d96850c75
########
# main view
########
# チーム開発しているとよくremoteで更新が入るため手元に同期
bind main ^r !git pull --rebase
# revert作業は手早く行う必要があるためバインドして効率化
bind main V !?git revert %(commit)
# 任意のリビジョンを再現するためにcheckoutすることが多いためバインド
bind main C !?git checkout %(commit)
@yoshikazusawa
yoshikazusawa / file0.txt
Created January 30, 2014 10:59
tigの画面をアニメGIFで紹介してみる(ファイル編集・差分の削除・revert編) ref: http://qiita.com/yoshikazusawa/items/d0df1327dcc9797bb91d
bind main V !?git revert %(commit)
@yoshikazusawa
yoshikazusawa / file0.txt
Created January 28, 2014 14:24
やけに丁寧なtigのキーバインド設定ガイド ref: http://qiita.com/yoshikazusawa/items/3eaa6db78fa348d38bfe
# デフォルトの bind generic G !git gc を無効化する
bind generic G none
@yoshikazusawa
yoshikazusawa / .tigrc
Last active July 25, 2016 14:17
やけに丁寧なtigの設定ガイド(表示制御編) ref: http://qiita.com/yoshikazusawa/items/d99e8b5d6f6a45aa6e2e
# 差分の前後の表示行数(diff-context)を指定
set diff-context = 6