This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Open Terminal.app. | |
# 2. Type "cd Desktop" and Enter. | |
# 3. Type "open ~/Library/Safari/" and Enter. | |
# 4. Hold Option key and drag-and-drop (i.e. copy) Bookmarks.plist to the Desktop. | |
# 5. Back to the Terminal, type "ruby safari-readling-list-to-instapaper-csv.rb" and Enter. | |
# 6. Open Instapaper Settings (https://www.instapaper.com/user), and select "Import from Instapaper CSV." | |
# 7. Upload Safari-Reading-List.csv on the Desktop. | |
require "plist" | |
require 'csv' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
src=/opt/homebrew-cask; dst=/usr/local; for f in ~/Applications/*.app; do [ -h $f ] && l=$(readlink $f); ln -sf ${l/$src/$dst} $f; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:var%20d=document,h='#form-contents',f='https://www.kinokuniya.co.jp/disp/CKnSfStockSearchStockView',l=d.location,b0='978'+l.href.match('https://www.amazon.co.jp/.*(?:dp|product)/([0-9X]{10})/')[1].substr(0,9),bn=b0+(10-(b0.split('').map((x,i)=>(xx=parseInt(x),(i%252==0)?xx:xx*3)).reduce((acc,cur)=>acc+cur,0)%2510)),e=encodeURIComponent,p='.jsp?CAT=01&GOODS_STK_NO='+e(bn)+'&MAN_ENTR_CD1=G2';1;try{if%20(!/^(.*\.)?kinokuniya\.[^.]*$/.test(l.host))throw(0);share_internal_bookmarklet(p)}catch(z)%20{a=function()%20{if%20(!window.open(f+p+h,'stockinfo','toolbar=0,status=0,resizable=1,width=700,height=500'))l.href=f+p+h};if%20(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else{a()}}void(0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html | |
title Morning Relay by Shuntaro Tanigawa | |
script(src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js") | |
body.world | |
#kamchatka.place | |
.person.guy.is-dreaming.giraffe | |
.clock | |
audio(src="alarm-kamchatka-boy.mp3").alarm | |
#mexico.place | |
.person.maiden.is-waiting(for="bus") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Homepage extends Chaplin.Model | |
_.extend @prototype, Chaplin.EventBroker | |
result: (val) -> | |
if val | |
publishEvent "change:result", result | |
getRemoteData: () -> | |
$.ajax () => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>"compositionstart" and "compositionend" events, and Japanese Input Method</title> | |
</head> | |
<body> | |
<textarea name="textarea" id="textarea" cols="30" rows="3"></textarea> | |
<h2>onkeydown</h2> | |
<p>nowCompositioning: <span id="nowCompositioning"></span></p> | |
<p>keyCode: <span id="keyCode"></span></p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FooView extends View | |
constructor: (@jquery, @model) -> | |
super @jquery, @model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# Factory Method Example in CoffeeScript | |
## Introduction | |
This example of the factory method pattern is a part of a [Tic-tac-toe](http://en.wikipedia.org/wiki/Tic-tac-toe) application. See [Wikipedia](http://en.wikipedia.org/wiki/File:Factory_Method_UML_class_diagram.svg) for the UML diagram of the factory method pattern. | |
This example has four classes: Grid, GridCell, Board and Space. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'), | |
https = require('https'), | |
httpProxy = require('http-proxy'); | |
var options = { | |
https: { | |
key: fs.readFileSync('path/to/your/key.pem', 'utf8'), | |
cert: fs.readFileSync('path/to/your/cert.pem', 'utf8') | |
}, | |
target: { |
NewerOlder