Skip to content

Instantly share code, notes, and snippets.

View hkoba's full-sized avatar

Kobayasi, Hiroaki hkoba

View GitHub Profile
@hkoba
hkoba / hid-surface-typecover3-ja.patch
Created April 5, 2015 07:24
Tiny patch for linux 3.19 to use Type Cover 3 (Japanese edition) for Microsoft Surface Pro 3. (But this way, touchpad on type cover is disabled... :-<)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 8b63879..c9116ee 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -704,7 +704,8 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type)
hid->group = HID_GROUP_SENSOR_HUB;
if (hid->vendor == USB_VENDOR_ID_MICROSOFT &&
- hid->product == USB_DEVICE_ID_MS_TYPE_COVER_3 &&
+ (hid->product == USB_DEVICE_ID_MS_TYPE_COVER_3 ||
@hkoba
hkoba / lang-c-yum-check-n-rpm-V.sh
Last active August 29, 2015 14:18
How to verify duplicate installations when you have yum check errors.
LANG=C yum check |
perl -nle 'm{^(?:\d+:)?(\S+)\s*is a duplicate with\s*(?:\d+:)?(\S+)} and print $1,"\t", $2' |
while read new old; do
echo "=="
echo old=$old
rpm -V $old
echo new=$new
rpm -V $new
echo
done
@hkoba
hkoba / fedup-segv-backtrace.log
Last active August 29, 2015 14:25
Stacktrace of segv error in fedup (from fedora 21 to 22). Are there someone facing same/similar issue?
# Note: Although this is reproducible for my machine,
# I suspect (unknown) hardware problems of my machine.
# So please do not assume this can occur generally.
Program received signal SIGSEGV, Segmentation fault.
PyObject_Malloc (nbytes=nbytes@entry=72)
at /usr/src/debug/Python-2.7.8/Objects/obmalloc.c:809
809 if ((pool->freeblock = *(block **)bp) != NULL) {
#0 PyObject_Malloc (nbytes=nbytes@entry=72)
.file "petithtmlescaper.c"
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "\">``{}"
.section .text.unlikely,"ax",@progbits
.LCOLDB1:
.text
.LHOTB1:
.p2align 4,,15
.globl phe_escape_html
.file "petithtmlescaper.c"
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "\">``{}"
.section .text.unlikely,"ax",@progbits
.LCOLDB1:
.text
.LHOTB1:
.p2align 4,,15
.globl phe_escape_html
@hkoba
hkoba / ABNF.pm6
Last active October 14, 2015 03:00
Experimental ABNF (rfc5234) acceptor in Perl6 grammar
#
# See also https://tools.ietf.org/html/rfc5234#section-4
# If you want to trace how this works, install https://github.com/jnthn/grammar-debugger/
# and uncomment below.
#
# use Grammar::Tracer;
grammar ABNF {
@hkoba
hkoba / firefox-jit-segv.log
Created November 8, 2015 23:45
firefox-42.0-2.fc22.x86_64 segv
Program received signal SIGSEGV, Segmentation fault.
__memset_avx2 () at ../sysdeps/x86_64/multiarch/memset-avx2.S:135
135 vmovdqu %ymm0, (%rax)
#0 0x00007f272fdf140e in __memset_avx2 ()
at ../sysdeps/x86_64/multiarch/memset-avx2.S:135
#1 0x00007f2724226d94 in js::jit::JitCode::finalize(js::FreeOp*) ()
at /usr/lib64/firefox/libxul.so
#2 0x00007f2724390a75 in bool FinalizeTypedArenas<js::jit::JitCode>(js::FreeOp*, js::gc::ArenaHeader**, js::gc::SortedArenaList&, js::gc::AllocKind, js::SliceBudget&, js::gc::ArenaLists::KeepArenasEnum) () at /usr/lib64/firefox/libxul.so
#3 0x00007f27243b1841 in js::gc::ArenaLists::foregroundFinalize(js::FreeOp*, js::gc::AllocKind, js::SliceBudget&, js::gc::SortedArenaList&) ()
at /usr/lib64/firefox/libxul.so
@hkoba
hkoba / Crash Reports submit.log
Created November 20, 2015 12:01
Crash list of my firefox-41 and 42
[2015年10月11日 18時50分06秒] Crash report submitted successfully
[2015年10月13日 21時53分06秒] Crash report submitted successfully
[2015年10月14日 15時56分50秒] Crash report submitted successfully
[2015年10月15日 20時53分31秒] Crash report submitted successfully
[2015年10月17日 15時50分56秒] Crash report submitted successfully
[2015年10月17日 23時28分23秒] Crash report submitted successfully
[2015年10月17日 23時28分56秒] Crash report submitted successfully
[2015年10月18日 22時04分11秒] Crash report submitted successfully
[2015年10月21日 23時54分51秒] Crash report submitted successfully
[2015年10月31日 19時12分50秒] Crash report submission failed: Couldn't resolve host name
@hkoba
hkoba / gist:6720666d1e6752b9c0e9
Created December 2, 2015 06:46
mobaxterm -> local terminal -> rxvt session log
[burib_000.kvm-win8] > foo="<$(ls)>"
[2015-12-02 15:43.57] ~
[burib_000.kvm-win8] > echo -n "[$foo]"|od -c
0000000 [ < D e s k t o p \n L a u n c h
0000020 e r F o l d e r \n M y D o c u m
0000040 e n t s > ]
0000046
[2015-12-02 15:44.20] ~
@hkoba
hkoba / Right-Extended-US-keyboard-for-_nix-users_.kbd.json
Created January 16, 2016 08:52
Right Extended US keyboard for *nix users.
[
{
"name": "Right Extended US keyboard for *nix users.",
"author": "Hiroaki KOBAYASHI (hkoba)"
},
[
"Esc",
"!\n1",
"@\n2",
"#\n3",