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
module VB | |
# 整数nの符号化 | |
# バイト列のバイナリへの変換を忘れないこと! | |
def self.encode_number(n) | |
bytes = [] | |
# ほげほげ | |
bytes # このままだと… | |
end |
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 './vb' | |
filename = ARGV[0] | |
File.open(filename, 'r').each_line do |line| | |
line.chomp! # 末尾の改行を削除 | |
# ほげほげ | |
print [tag.bytesize, vb.bytesize], tag, vb | |
end |
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 './vb' | |
filename = ARGV[0] | |
File.open(filename, 'rb') do |file| | |
until file.eof | |
# ほげほげ | |
puts "#{tag}\t#{numbers.join(',')}" | |
end | |
end |
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
theory Situation | |
type person = A | B | C | |
type status = Honest | Liar | |
function status (person) : status | |
axiom Honest_is_the_only_one: | |
(status A = Honest /\ status B = Liar /\ status C = Liar) \/ | |
(status A = Liar /\ status B = Honest /\ status C = Liar) \/ | |
(status A = Liar /\ status B = Liar /\ status C = Honest) |
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
#!/bin/bash | |
set -ex | |
cd ~ | |
TMP_DIR=`mktemp -d --suffix=-home` | |
# すべてのファイルを一時的に退避 | |
sudo mv * .[^\.]* $TMP_DIR |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"os" | |
"time" | |
_ "github.com/go-sql-driver/mysql" |
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
#!/bin/bash | |
# 初回のみ | |
git clone --depth 1 https://github.com/matsuu/vagrant-isucon | |
cd vagrant-isucon/isucon7-qualifier | |
vagrant up bench | |
# ホストアドレスをカンマ区切りで指定 | |
IMAGE_HOST_IP="XXX.XXX.XXX.XXX,XXX.XXX.XXX.XXX" |
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
#!/bin/bash | |
# 初回のみ | |
git clone --depth 1 https://github.com/tyabu12/vagrant-pixiv-isucon2016.git | |
cd vagrant-pixiv-isucon2016 | |
vagrant up bench | |
IMAGE_HOST_IP="XXX.XXX.XXX.XXX" | |
vagrant ssh bench -c "sudo -u isucon sh -c '/opt/go/bin/benchmarker -t http://$IMAGE_HOST_IP -u /opt/go/src/github.com/tyabu12/private-isu/benchmarker/userdata'" |
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
#!/bin/bash | |
USERNAME="CHANGE ME" | |
PROVIDER_NAME="virtualbox" | |
ACCESS_TOKEN="CHANGE ME" | |
set -eu | |
if [ $# -ne 3 ]; then | |
cat <<_EOT_ |
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
#!/bin/bash | |
# 初回のみ | |
git clone --depth 1 https://github.com/matsuu/vagrant-isucon | |
cd vagrant-isucon/isucon6-qualifier | |
vagrant up bench | |
IMAGE_HOST_IP="XXX.XXX.XXX.XXX" | |
vagrant ssh bench -c "sudo -u isucon sh -c 'cd /home/isucon/isucon6q; ./isucon6q-bench -target $IMAGE_HOST_IP'" |