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
'use strict'; | |
var http = require('http'); | |
var url = require('url'); | |
var mime = require('mime'); | |
var fs = require('fs'); | |
var multiparty = require('multiparty'); | |
var util = require('util'); | |
var port, uploadDir; |
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 cursorline | |
set incsearch | |
set hlsearch | |
set ignorecase | |
set smartcase | |
nnoremap <C-l> :nohls<CR> | |
vmap X y/<C-R>"<CR> | |
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
{-# LANGUAGE TypeSynonymInstances #-} | |
import qualified Data.ByteString.Lazy.Char8 as L8 | |
import qualified Data.ByteString.Lazy as L | |
import qualified Data.Binary.Get as G | |
import Data.Char (isSpace) | |
import Data.Int | |
import Data.Maybe | |
import Control.Monad | |
import Control.Monad.Trans.State |
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
#!/usr/bin/env node | |
'use strict'; | |
var http = require('http'); | |
var url = require('url'); | |
var fs = require('fs'); | |
var mime = require('mime'); | |
var exec = require('child_process').exec; | |
var db = {}; |
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.Environment | |
import System.Exit | |
import System.Locale | |
import Control.Monad | |
import Data.Char (isSpace) | |
import Data.Maybe (catMaybes) | |
import Text.Printf (printf) | |
import Text.Read (readMaybe) | |
import Data.Time.Format | |
import Data.Time.Clock |
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
#! /usr/bin/ruby -w | |
# encoding: utf-8 | |
require 'date' | |
class Ticket | |
def initialize(string) | |
@nation, term = string.split | |
@departure, @arrival = term.split(/-/).map { |e| Date.parse("2012/" + e) } | |
@trip_num = 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
split :: Eq a => a -> [a] -> [[a]] | |
split _ [] = [[]] | |
split delim str = | |
let (before, remainder) = span (/= delim) str | |
in before:case remainder of | |
[] -> [] | |
x -> split delim $ tail 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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<title>HTML5を使ったメモ帳</title> | |
</head> | |
<body> | |
<h1>メモ帳</h1> |
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
#! /usr/bin/env node | |
var filePath = process.argv[2]; | |
var connect = require('connect'), | |
http = require('http'), | |
child_process = require('child_process'), | |
port = '', | |
directory = '.'; | |
if (process.argv.length !== 3) { |
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
#! /usr/bin/env node | |
var http = require('http'); | |
var fs = require('fs'); | |
var querystring = require('querystring'); | |
function queryAnswer(str, expect) { | |
var options = { | |
host: 'spacetalky.textfile.org', | |
method: 'GET'}; |