Skip to content

Instantly share code, notes, and snippets.

View pchw's full-sized avatar

Hiroshi HORIKI pchw

View GitHub Profile
@pchw
pchw / gist:9849568
Last active June 24, 2019 05:00
#jsおじさん発表資料収拾
@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 / 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 / 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 / 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 / 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 / Gruntfile.coffee
Created June 10, 2014 05:50
use power-assert on .coffee test
module.exports = (grunt) ->
require('time-grunt')(grunt)
require('load-grunt-config')(grunt)
class Base
class LibraryName.Klass extends Base
constructor: ->
@name = @constructor.name
@namespace = "?"
Parent = exports? and exports or @Parent = {}
@pchw
pchw / index.coffee
Created July 12, 2014 03:45
コマンドライン引数の文字列をvoicetext web apiで喋らせる
require 'coffee-script/register'
fs = require 'fs'
stream = require 'stream'
Speaker = require 'speaker'
VoiceText = require '../src/lib/voicetext'
voice = new VoiceText('<your api key>')
text = process.argv[2] or 'きょうも いちにち がんばるぞい'
@pchw
pchw / start_markdown.md
Created August 12, 2014 07:26
マークダウン入門

Markdown入門

Markdownはただのテキストでありながら,構造的な文章を書くための記法です. 装飾を表現するための手法が最低限しか無いため,きちんとした文章を手軽に書くための記法として最適です.

また,HTMLなどに変換する際にきちんとマークアップされるため綺麗な見た目にして表示することも容易です.

議事録・メール・GitHub上での議論など様々なところで見やすく構造的な文章を書くにあたって大いに役立ちます.