Skip to content

Instantly share code, notes, and snippets.

View fujieda's full-sized avatar

Kazuhiro Fujieda fujieda

View GitHub Profile
@fujieda
fujieda / gist:9369605
Last active August 29, 2015 13:57
大型艦建造記録
秘書艦金剛改二 大和狙い
4000/5000/6000/2000/20
1/8 扶桑
1/9 まるゆ
1/10 長門
1/11 比叡
1/13 日向
1/14 長門
1/15 陸奥
4000/6000/6000/2000/20

KancolleSniffer

[KancolleSniffer]は、艦これのサーバーとブラウザの間の通信をキャプチャして、幅285px高さ550pxのウィンドウに以下の情報をすべて表示するツールです。

  • 入渠、建造、遠征の終了を知らせる自動式タイマー
  • 艦娘数、装備数、バケツ数
  • 起動中に稼いだ戦果(ボーナス戦果を除く)
  • 艦娘の耐久、コンディション値、レベル、次のレベルまでの経験値
  • 艦隊の制空値
@fujieda
fujieda / 明石タイマーの仕様.md
Last active August 29, 2015 14:01
明石タイマーの仕様

明石タイマーの仕様

明石の泊地修理が進むのは、修理開始後20分以降に母港に戻って艦娘のステータスを確認したときである。修理が進んでいたら、その時点を修理開始として計時がリスタートする。修理が進んでいないなら計時が継続する。

以下に示すのは、泊地修理開始後の経過時間をサーバー側で計っている「明石タイマー」の仕様を推測したものである。

以下はすべて明石が旗艦かつ入渠していないことを前提としている。修理可能な艦とは、明石が修理可能な範囲にある中破未満の損傷を持つ入渠していない艦(自身を含む)のことである。

開始

@fujieda
fujieda / 艦種
Created July 11, 2014 02:40
艦種
api_stype:
1 海防艦
2 駆逐艦
3 軽巡洋艦
4 重雷装巡洋艦
5 重巡洋艦
6 航空巡洋艦
7 軽空母
8 高速戦艦
9 低速戦艦
@fujieda
fujieda / gist:b244bd7b8bb218a8569d
Created July 11, 2014 10:59
戦闘開始から遭遇状況表示までの遅延(ms)
var result = 7200;
if (formation >= 3)
result += 200; // T字有利or不利
if (search == 1 || // 索敵機による索敵成功
search == 2) // 索敵機未帰還あり
result += 5700;
if (search == 3 || // 索敵機未帰還
search == 4) // 索敵機による索敵失敗
result += 4900;
if (search == 5) // 索敵力による索敵成功
@fujieda
fujieda / 24634447-Overview-on-encryption-and-deduplication.md
Last active August 29, 2015 14:08
Bitcasaの暗号化と重複排除の概要

暗号化と重複排除の概要

訳注: これはOverview on encryption and deduplicationをBitcasa社から許諾を得て和訳したものである。

データはどのように暗号化されるのか

ユーザーがデスクトップアプリケーションを使ってコンテンツをBitcasa Driveにコピーしたとき、まずクライアント側でconvergent encryptionと呼ばれる手法で暗号化される。そして小さなデータのブロックとしてキャッシュにコピーされる。convergent encryptionではファイルのハッシュを用いて、ファイルを暗号化するための一意な鍵集合を生成する。convergent encryptionについてはWikipediaにより詳しい説明がある。データがキャッシュにコピーされたら、同期プロトコルでBitcasaにアップロードされる。ユーザーのファイルシステムは、Bitcasaアカウントを作ったときに生成されたユーザーキーで暗号化される。

この暗号化によって、ユーザーのアカウントの中にあるあらゆるデータ(ファイル名を含む)を我々がまったく見られなくなる。我々の側から見えるのは、何の意味もないデータのブロックと、それがユーザーのBitcasa Driveの中でどれくらい容量を使っているかだけである。データが復号化されて再構築されるのは、ユーザーがユーザー名とパスワードを使ってアカウントにログインしたときだけだ。我々は暗号鍵や生のままのパスワードはサーバーにまったく保存しない。

@fujieda
fujieda / remodel_slot.md
Created January 30, 2015 09:26
装備改修のAPI
  • 成功の場合
url: 125.6.184.16/kcsapi/api_req_kousyou/remodel_slot
request: api%5Fslot%5Fid=46284&api%5Fid=101&api%5Fverno=1&api%5Ftoken=&api%5Fcertain%5Fflag=0
response: {"api_result":1,"api_result_msg":"成功","api_data":{"api_remodel_flag":1,"api_remodel_id":[2,2],"api_after_material":[25578,26962,22173,34490,1425,1564,2183,9],"api_voice_id":"0","api_after_slot":{"api_id":46284,"api_slotitem_id":2,"api_locked":1,"api_level":5}}}

api_after_slotに改修後の装備が返る。

@fujieda
fujieda / l2arc_write
Created December 2, 2011 12:01
A dtrace script to investigate the behavior of L2ARC writing to its storages.
#!/usr/sbin/dtrace -qs
l2arc_write_buffers:entry
{
self->guid = ((l2arc_dev_t *)arg1)->l2ad_vdev->vdev_guid;
}
l2arc_write_buffers:return
{
printf("%lu: dev: %llx written: %ld\n", timestamp / 1000000, self->guid, arg1);
@fujieda
fujieda / gist:3430536
Created August 22, 2012 23:29
HTML to read favicon in advance
<script type="text/javascript">
<!--
image = new Image();
image.src="favicon.ico";
//-->
</script>
<link rel="shortcut icon" href="favicon.ico"/>
<link rel="icon" href="favicon.ico"/>
@fujieda
fujieda / gist:3967962
Created October 28, 2012 07:27
E-mail from amazon.com

Hello from Amazon.

We are writing because the home country registered to your Kindle account may not match your country of residence. Due to publishing rights, the home country registered to your account must match your country of residence.

To continue purchasing titles available for The United States, please send a copy of your valid government-issued identity card, passport, or a utility bill received within the previous 90 days to our secure fax line:

Within the US: 206-266-1838
Outside the US: (00)1-206-266-1838

For your security, you may obscure the passport, ID, or account number. However, we ask that you do not obscure any portion of your name, your address, or any expiration or statement dates.