This file contains 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 system = require('system'); | |
var fs = require('fs'); | |
var args = system.args; | |
// args is phantomjs api. | |
// args [3] and later arguments of casperjs | |
var _args = args.slice(3); | |
if(_args.length < 2) { | |
console.log("USAGE: casperjs scrape.js URL"); | |
phantom.exit(); |
This file contains 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
// URL RegureExpression. | |
var regURL = /(https?:)\/\/([^\/]+)(([^?#]*\/)?([^#?]+)?)(\?[^#?]+)?(#.*)?/; | |
// if matched returns below | |
// 0: URL ex) "http://example.com/path/to/index.html?foo=bar#baz" | |
// 1: Scheme ex) "http:" | |
// 2: Domain ex) "example.com" | |
// 3: Path ex) "/path/to/index.html" | |
// 4: Directory ex) "/path/to/" | |
// 5: File ex) "index.html" | |
// 6: Query ex) "?foo=bar" |
This file contains 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
zone = [ | |
SOA( | |
'example.com', | |
mname = 'ns1.example.com', | |
serial = 2014051901, | |
refresh = '1H', | |
retry = '1H', | |
expire = '1H', | |
minimum = '1H' | |
), |
This file contains 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
// TODO ラベルの位置 | |
// TODO Windowリサイズ | |
;(function($) { | |
function mark($target, options) { | |
var defaults = { | |
'border_width': '2px', | |
'border_color': '#f00', | |
'class_prefix': 'jqmark', |
This file contains 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
#prefix | |
set-option -g prefix C-t | |
#key | |
bind r source-file ~/.tmux.conf; display-message "tmux conf reloaded." | |
bind s split-window -v | |
bind v split-window -h | |
bind j select-pane -D | |
bind k select-pane -U | |
bind h select-pane -L |
This file contains 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
// require | |
const self = require("sdk/self"); | |
const data = self.data; | |
const addonPage = require("sdk/addon-page"); | |
const frameUtils = require('sdk/frame/utils'); | |
const tabs = require("sdk/tabs"); | |
const widget = require('sdk/widget'); | |
const windowUtils = require('sdk/window/utils'); | |
const windows = require("sdk/windows").browserWindows; |
This file contains 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
{- | |
Chapter 1 はじめの第一歩 | |
-} | |
{- | |
新しめのGHCiでは:{と}:で囲むことで複数行にわたって式を記述できる。 | |
またGHCi7.2.1以降では:set +mとすることで複数行にわたって式を記述できる。 | |
-} | |
Prelude> 2 + 15 |
This file contains 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
{- | |
Chapter 2 型を信じろ! | |
-} | |
{- | |
2.1 明示的な型宣言 | |
-} | |
{- | |
:: という記号は「の型を持つ」と読む。 |
This file contains 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
set nocompatible | |
set number | |
set showmode | |
set ruler | |
set showcmd | |
set showmatch | |
set laststatus=2 | |
set statusline=[%{&fileencoding}][\%{&fileformat}]\ %F%m%r%=<%c:%l> | |
syntax on |
This file contains 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
; hello-os | |
ORG 0x7c00 ; このプログラムがどこに読み込まれるのか | |
; 以下は標準的なFAT12フォーマットフロッピーディスクのための記述 | |
JMP SHORT entry | |
DB 0x90 | |
DB "HELLOIPL" ; ブートセクタの名前を自由に書いてよい(8バイト) | |
DW 512 ; 1セクタの大きさ(512にしなければいけない) | |
DB 1 ; クラスタの大きさ(1セクタにしなければいけない) |
OlderNewer