Skip to content

Instantly share code, notes, and snippets.

View pchw's full-sized avatar

Hiroshi HORIKI pchw

View GitHub Profile
@pchw
pchw / marionette_render_patch.coffee
Created May 27, 2014 02:10
marionette patch for using with ICanHaz.js
$ = require 'jquery'
Backbone = require 'backbone'
Backbone.$ = $
Marionette = require 'backbone.marionette'
ich = require 'icanhaz'
ich.$ = $
module.exports = do =>
Backbone.Marionette.ItemView::render = ->
@isClosed = false
@pchw
pchw / tweet_bookmarlket.md
Created May 27, 2014 02:07
bookmarklet for tweet using Twitter for Mac
javascript:(function(){t=document.title;t=t?t:"";u=location.href;h="twitter://post?message="+encodeURIComponent(t+" - "+u);location.href=h;})();
@pchw
pchw / sample.coffee
Created May 20, 2014 10:58
all property is available test
should = require 'should'
method = (a, b)->
unless a and b
return false
return true
describe 'logical test', ->
it 'missing a', ->
r = method false, true
@pchw
pchw / bookmarklet.md
Created May 15, 2014 07:15
Service Safari Bookmarklet
javascript:(function(){t=document.title;t=t?t:"";u=location.href;h="http://www.service-safari.com/posts/new?post_name="+encodeURIComponent(t)+"&post_url="+u;location.href=h;})();
@pchw
pchw / sushi
Last active August 29, 2015 14:00 — forked from hokaccha/sushi
node ver
$ node -e 'C=process.stdout.columns;S="\ud83c\udf63";console.log("\033[2J");a={};while(true){a[Math.random()*C|0]=0;for(x in a){o=a[x];a[x]+=1;console.log("\033["+o+";"+x+"H \033["+a[x]+";"+x+"H"+S+" \033[0;0H");}}'
@pchw
pchw / gist:9849568
Last active June 24, 2019 05:00
#jsおじさん発表資料収拾
extend = require('merge-recursive').recursive
_default =
conds: {}
flds: {}
skip: 0
limit: 0
sort:
crated_at: -1
@pchw
pchw / gitconfig
Last active December 29, 2015 07:39
gitconfig
[color]
branch = auto
diff = auto
status = auto
[alias]
st = status -sb
l = log --pretty=format:\"%ad %C(yellow)%h%Creset [%cn] %Cgreen%s %C(cyan)%d%Creset\" --date=short -10
co = checkout
ci = commit
fixup = commit --amend -C HEAD
@pchw
pchw / .mongorc.js
Created November 11, 2013 10:23
mongo cli helper
DBCollection.prototype.findById = function(id){return this.findOne({_id:ObjectId(id)});};
DBCollection.prototype.fbi = function(id){return this.findOne({_id:ObjectId(id)});};
@pchw
pchw / fleet.md
Created November 10, 2013 07:48
艦これ秋イベント「決戦!鉄底海域を抜けて!」E-4突破艦隊
艦船 Lv 装備1 装備2 装備3 装備4
夕立改 50 12.7cm連装砲 10cm連装高角砲 改良型艦本式タービン
阿武隈改 57 20.3cm連装砲 15.5cm三連装副砲 強化型艦本式艦
鳥海改 63 20.3cm連装砲 15.5cm三連装副砲 三式弾 21号対空電探
摩耶改 55 20.3cm連装砲 15.5cm三連装副砲 三式弾 強化型艦本式缶
金剛改 73 46cm三連装砲 15.5cm三連装副砲 三式弾 33号対水上電探
榛名改 74 46cm三連装砲 15.5cm三連装副砲 三式弾 21号対空電探