Skip to content

Instantly share code, notes, and snippets.

View key-amb's full-sized avatar

key-amb key-amb

View GitHub Profile

青空文庫年表(Web・DB・サーバ関連編)

基本的に「そらもよう」の情報より。最初の仮作成の情報のみ青空文庫年表 http://www.ag-n.jp/aozora-nenpyo/ を参照。

日付はそらもよう掲載日のため、実際に作業が行われた日とは前後することがあります。

主な流れ

  • 1997年 公開
  • 1999年 独自ドメイン移行、ミラーサーバ導入

青空文庫の技術(者)コミュニティ設計私案

2015/05/29 Masayoshi Takahashi (@takahashim)

参考情報: 「青空文庫の予備知識」http://togetter.com/li/827552

※ 技術(者)コミュニティには名前・呼称がないとめんどくさいので、何か名前をつけるべき→とりあえずgithubではaozorahackという名前になった。日本語名称は考えたほうがいいかも。

目的

@kazuho
kazuho / gist:6791809
Last active December 24, 2015 11:38
mysql-ranking-engineの使い方
-- テーブルを作る
CREATE TABLE t (
  user_id int unsigned not null,
  score int not null,
  ranking int unsigned,                -- rankingというカラムがエンジンによって自動更新される
  primary key (user_id),
  key ranking (score)                -- ランキング用のindex                  
) engine=ranking;
##
## Syntax
##
# Define a type:
#
# <MessageName>:
# <fieldIndex>: [<fieldName>, <type>, <options...>]
# ...
#
# Typedef (type alias):
# ls /proc/ | grep 238
23801
23807
23829
23843
23853
23856
23859
23871
@kazuho
kazuho / markdown.md
Last active July 30, 2019 09:14
Linuxカーネルのreadahead、うまく動いてないケースがあるのかも

大きなテキストファイルをawkで処理するときにcatで投げ込むと速い理由のような事象が発生する原因についての推察。

自信はあまりない!

Linuxカーネルのreadahead実装についての理解

  • __do_page_cache_readaheadは、次にreadaheadを実行すべきページについてのみReadaheadフラグをたてる
  • 次にreadaheadを実行すべきページ「以降の全てのページ」ではない
  • do_generic_file_readはReadaheadフラグの立っているページをreadするタイミングでpage_cache_async_readaheadを呼ぶ
  • page_cache_async_readaheadはBDI_sync_congestedが立っている場合はreadaheadしない
@yoheia
yoheia / perl_oneliner_example
Last active January 24, 2020 18:12
Perlワンライナー&マルチライナー集
Perl ワンライナーサンプル集
■概要
障害解析のためのログの調査、非互換対応でのソースコードの調査といった
テキスト処理で使った Perl ワンライナーのサンプル集です。
Perl ワンライナーは以下の点が良いと思います。
・Perl は Oracle Database (10g以降) に同梱されている。
 従って、Windows プラットフォームでも使える。
@takahashim
takahashim / aozora-api.md
Last active March 7, 2021 13:31
青空文庫のAPI化についての資料

青空文庫のAPI化についての資料

勝手にまとめているものです。随時更新中(last update: 2015/05/26)

3行まとめ

  • 現状、公式の「青空文庫API(サーバ)」はなさそう
  • 公式サイトでは作品データのCSVを配布している
  • このCSV等を使った「野良APIサーバ」の試みはあった(今もある)
@jay3sh
jay3sh / guard-my-mabook-when-i-am-away.sh
Created March 30, 2016 16:46
Guard My Macbook When I'm Away
#!/bin/bash
#
# When you are working on your macbook sitting in cafe and you have to go pee,
# you need some way to guard you machine.
#
# Start this script, remove any earphones, and go do the job.
# The assumption is the thief will close the lid of the laptop before taking it away.
# This script detects the closing of the lid and plays some loud audio that will
# likely distract the thief and/or grab attention of nearby people, making the
@koemu
koemu / getswap.sh
Created December 18, 2013 01:09
各プロセスのスワップ使用量を調べる。 なお、root or sudo での実行が必要。 参照元: http://northernmost.org/blog/find-out-what-is-using-your-swap/
#!/bin/bash
# Get current swap usage for all running processes
# Erik Ljungstrom 27/05/2011
# Updated: 2013-11-13 Yuichiro Saito
SUM=0
OVERALL=0
for DIR in `find /proc/ -maxdepth 1 -type d | egrep "^/proc/[0-9]"` ; do
PID=`echo $DIR | cut -d / -f 3`
PROGNAME=`ps -p $PID -o comm --no-headers`
for SWAP in `grep Swap $DIR/smaps 2>/dev/null| awk '{ print $2 }'`