Skip to content

Instantly share code, notes, and snippets.

View tinbotu's full-sized avatar

Akira KUMAGAI tinbotu

View GitHub Profile
@tinbotu
tinbotu / gist:4540397
Created January 15, 2013 17:41
df of raspberry pi
pi@raspberrypi ~ $ df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 3.5G 1.6G 1.8G 48% /
/dev/root 3.5G 1.6G 1.8G 48% /
devtmpfs 220M 0 220M 0% /dev
tmpfs 44M 216K 44M 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 88M 0 88M 0% /run/shm
/dev/mmcblk0p1 56M 17M 40M 30% /boot
/dev/mmcblk0p3 3.9G 377M 3.0G 12% /var
@tinbotu
tinbotu / gist:4459747
Created January 5, 2013 04:28
Raspberry Pi + Behringer UCA222 で Live mp3 streaming しているときの負荷
top - 13:23:02 up 14:11, 1 user, load average: 1.80, 1.74, 1.66
Tasks: 60 total, 1 running, 59 sleeping, 0 stopped, 0 zombie
%Cpu(s): 51.9 us, 2.1 sy, 0.0 ni, 45.7 id, 0.0 wa, 0.0 hi, 0.4 si, 0.0 st
KiB Mem: 448996 total, 105712 used, 343284 free, 19392 buffers
KiB Swap: 102396 total, 0 used, 102396 free, 63216 cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3383 pi 20 0 10980 2760 2148 S 50.2 0.6 236:07.72 darkice
3359 icecast2 20 0 13916 3032 2112 S 1.0 0.7 4:18.36 icecast2
4900 pi 20 0 5644 1396 1040 R 0.8 0.3 0:06.64 top
@tinbotu
tinbotu / gist:4369741
Created December 24, 2012 15:59
AIR-AP1242AG-P-K9
o
^
% Invalid input detected at '^' marker.
Press RETURN to get started!
*Mar 1 00:00:05.272: %SOAP_FIPS-2-SELF_TEST_IOS_SUCCESS: IOS crypto FIPS self test passed
@tinbotu
tinbotu / nmea.c.diff
Created December 10, 2012 18:02
gpsbabel patch supporting Sony GPS-CS1 Style
--- ../nmea.c 2012-12-11 01:46:06.000000000 +0900
+++ nmea.c 2012-12-11 01:56:11.000000000 +0900
@@ -175,6 +175,7 @@
static char* opt_append;
static char* opt_gisteq;
static char* opt_ignorefix;
+static char* opt_sonycs1;
static long sleepus;
static int getposn;
@tinbotu
tinbotu / gist:4235870
Created December 7, 2012 19:36
Cisco Aironet Lightweight AP を Autonomous AP にダウングレードする
1. tftp サーバを 10.0.0.2 で用意する.
2. Autonomous AP の IOS ソフトウェアを / に配置し、ファイル名を変更. リビジョン部以降を "default" にリネームまたはシンボリックリンクする. 今回は c1240-k9w7-tar.default -> c1240-k9w7-tar.124-21a.JY.tar とした。
3. アクセスポイントの MODE ボタンを押しながら電源投入、MODE ボタンはそのまま押し続け STATUS LED が赤になったら離す.
4. コンソールに
>>
process_config_recovery: set IP address and config to default 10.0.0.1
process_config_recovery: image recovery
@tinbotu
tinbotu / bonnie.txt
Created September 12, 2012 23:35
bonnie on MBP2009 + Hitachi HTS545016B9SA02
pha:~/tmp$ bonnie++
Writing a byte at a time...done
Writing intelligently...done
Rewriting...done
Reading a byte at a time...done
Reading intelligently...done
start 'em...done...done...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
@tinbotu
tinbotu / bonnie.txt
Created September 12, 2012 23:23
bonnie on Atom330 ION + Hitachi Deskstar 7K1000.C HDS721010CLA332
stingray:~/bin/bonnie/bonnie++-1.03e$ ./bonnie++
Writing with putc()...done
Writing intelligently...done
Rewriting...done
Reading with getc()...done
Reading intelligently...done
start 'em...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
@tinbotu
tinbotu / gist:3694056
Created September 10, 2012 21:34
Squid's external acl problem
squid の external acl を perl で書いてたんだけどあるときから exteranal acl daemon 自体が起動しなくなった
2012/09/11 05:33:15| externalAclLookup: 'authed_ext' queue overload (ch=0x2300e300)
とか出る。Overload もなにも、1個のURLにアクセスしただけでコイツが発生するので、何それと思ってちょっとまえのログ見たら
2012/09/11 06:04:23| helperOpenServers: Starting 1/1 'perl' processes
2012/09/11 06:04:23| commBind: Cannot bind socket FD 7 to [::1]: (99) Cannot assign requested address
2012/09/11 06:04:23| commBind: Cannot bind socket FD 8 to [::1]: (99) Cannot assign requested address
2012/09/11 06:04:23| ipcCreate: Failed to create child FD.
2012/09/11 06:04:23| WARNING: Cannot run '/usr/bin/perl' process.
@tinbotu
tinbotu / script.rb.diff
Created August 14, 2012 14:43
fixing Gyazoed image scale with Macbook Pro Retina grows twice
--- /Applications/Gyazo.app/Contents/Resources/script~ 2012-08-14 07:50:01.000000000 +0900
+++ /Applications/Gyazo.app/Contents/Resources/script 2012-08-14 23:31:39.000000000 +0900
@@ -24,6 +24,7 @@
else
system "screencapture -i \"#{tmpfile}\""
if File.exist?(tmpfile) then
+ system "/usr/local/bin/mogrify -resize 50% -unsharp 1x1.2+0.2+0 \"#{tmpfile}\""
system "sips -d profile --deleteColorManagementProperties \"#{tmpfile}\""
end
end
#!/usr/bin/perl
#
use strict;
while(1){
print `date '+%H:%M:%S.%N'`;
sleep .01;
}