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
javascript:var pathname=window.prompt('pathname:');if (pathname !== null) location.pathname=pathname; |
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 http = require('http'), | |
fs = require('fs'); | |
var i = Date.now(); | |
function run () { | |
http.request({ | |
//host: '199.96.57.7', | |
//host: '117.18.237.139', | |
host: 'cs90.wac.edgecastcdn.net', |
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
function EOF () {} | |
function State (list) { | |
this._pos = 0; | |
this._list = Array.prototype.slice.call(list).concat([EOF]); | |
} | |
State.prototype.getList = function () { | |
return this._list.slice(this._pos); | |
}; |
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
/* | |
The MIT License (MIT) | |
Copyright (c) <2014> <Hidekazu Kobayashi> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
int pick(int *rate, int types) { | |
int i = 0, max = 0, sum = 0, rnd; | |
for (i = 0; i < types; ++i) { | |
max += rate[i]; | |
} |
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
(function () { | |
var style = document.createElement('style'); | |
style.appendChild(document.createTextNode('* { font-family: "HG創英角ポップ体" !important }')); | |
document.head.appendChild(style); | |
})(); |
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 -g prefix C-t | |
unbind-key C-b | |
bind-key C-t send-prefix | |
set -g default-terminal xterm-256color | |
set-option -g default-shell /bin/zsh | |
# powerline | |
set-option -g pane-active-border-fg colour54 |
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
;; -Powerline | |
(defun git-branch-mode-line () | |
(let* ((branch (replace-regexp-in-string | |
"[\r\n]+\\'" "" | |
(shell-command-to-string "git symbolic-ref -q HEAD"))) | |
(mode-line-str (if (string-match "^refs/heads/" branch) | |
(format " [%s]" (substring branch 11)) ""))) | |
(propertize mode-line-str 'face 'mode-line-4-fg))) | |
(line-number-mode t) |
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
/* | |
* This program is licensed under the MIT License. | |
* see: http://koba789.mit-license.org/ | |
* | |
* node cnv.js 260 | |
*/ | |
var input = Number(process.argv[2] || 0); | |
var k, |
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
/* | |
Nabeatsu without string manipulations | |
Copyright (C) 2014 KOBA789 | |
This program is free software; you can redistribute it and/or | |
modify it under the terms of the GNU General Public License | |
as published by the Free Software Foundation; either version 2 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, |