Skip to content

Instantly share code, notes, and snippets.

@tokoroten
tokoroten / result.txt
Last active August 29, 2015 14:04
http://brevis.exblog.jp/22236990/ 稼働率100%の施設における在庫量とリードタイムのシミュレーション
days, input_load, worker_stacks, total_stacks, output, ave_lead_time
case 100% input 1...6
0 2 [2, 0, 0, 0, 0] 2 0 5
1 5 [5, 2, 0, 0, 0] 7 0 6
2 2 [2, 5, 2, 0, 0] 9 0 6
3 3 [3, 5, 2, 2, 0] 12 0 6
4 3 [3, 4, 4, 2, 2] 15 0 7
5 6 [6, 3, 4, 5, 1] 19 2 8
6 1 [4, 3, 6, 1, 5] 19 1 8
7 4 [4, 4, 3, 6, 2] 19 4 8
@syohex
syohex / fujiwara-aa.pl
Last active December 25, 2015 03:59
AA of fujiwara-san
#!perl
use strict;
use warnings;
use Furl;
use Imager;
use Text::AAlib qw(:all);
my $url = 'https://1.gravatar.com/avatar/ca6281fff64797dc419b78f51f25c0a5?d=https%3A%2F%2Fidenticons.github.com%2F51beaebc231c8720d18d10b0008693dc.png&s=420';
my $ua = Furl->new;
@kazuho
kazuho / gist:4122754
Created November 21, 2012 03:00
The "queue_stats()" function, introduced in Q4M 0.9.7
How it looks like
==================================
mysql> select queue_stats('t');
+------------------------------------------------------------------------------------------------------------------------------+
| queue_stats('t') |
+------------------------------------------------------------------------------------------------------------------------------+
| rows_written: 0
rows_removed: 0
wait_immediate: 0
@riywo
riywo / gist:836630
Created February 21, 2011 03:41
指定秒間だけtcpdumpしてmk-query-digestするshell
#!/bin/sh
SEC=$1
tcpdump -s 65535 -nn -q -tttt -x port 3306 -l > /tmp/tcpdump.3306 2> /dev/null &
PID_3306=$!
tcpdump -s 65535 -nn -q -tttt -x port 11211 -l > /tmp/tcpdump.11211 2> /dev/null &
PID_11211=$!