Tokyo, Japan January 30-February 1, 2013
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
import System.Directory | |
import Data.List | |
findDotIndex :: String -> Int | |
findDotIndex a = case findIndex (=='.') a of | |
Just x -> x | |
otherwise -> 0 | |
splitAtDot :: String -> (String, String) | |
splitAtDot x = splitAt (findDotIndex x) x |
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 log = console.log.bind(console); | |
function choiceReadLength(length) { | |
if (length <= 8) return 8; | |
if (length <= 16) return 16; | |
if (length <= 32) return 32; | |
throw new Error('too large length'); | |
} | |
function choiceReadMethod(readLength) { |
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
log = console.log.bind(console); | |
var assert = require('assert'); | |
function test() { | |
var tests = Array.prototype.slice.call(arguments); | |
function next() { | |
if(!tests.length) return; | |
var args = Array.prototype.slice.call(arguments); | |
args.push(next); | |
var t = tests.shift(); |
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 mongoose = require('mongoose'); | |
mongoose.connect('localhost', 'testing_invalidate'); | |
var schema = new mongoose.Schema({ | |
name: { type: String, required: true }, | |
pass: { type: String, required: true }, | |
}); | |
schema.methods.setPassword = function setPassword (pwd, confirm) { | |
if (pwd === confirm) { |
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
Verifying that +jxck is my blockchain ID. https://onename.com/jxck |
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
func padding(str string) string { | |
return strings.Repeat("0", 8 - len(str)) + str | |
} |
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
node_modules |
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
.DS_Store |
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
全て Without Indexing で送るパターン | |
HT を更新しない。 | |
結果的には :scheme, :method くらいしか使いまわさないパターン。 | |
[1] | |
HeaderSet | |
:scheme: https | |
:host: jxck.io |