Skip to content

Instantly share code, notes, and snippets.

View fujii's full-sized avatar

Fujii Hironori fujii

View GitHub Profile
#! /bin/bash
opt=()
while test $# -gt 0 -a "${1:0:1}" = -; do
opt=("${opt[@]}" "$1")
shift
done
if test $# -lt 3; then
echo Usage: $0 [diff options] command [command options] file-a file-b
#! /usr/bin/ruby
$p4_rebase_txt = 'p4-rebase.txt'
$p4description = 'p4-description.txt'
def parse_description(s)
lines = s.split("\n")
until lines.empty? || lines[0] == "Description:"
lines.shift
end
#! /bin/sh
git reset -q 'HEAD^' -- "$@"
git commit --amend --no-edit --allow-empty
git reset -q 'HEAD@{1}' -- "$@"
@fujii
fujii / dnf-search.py
Last active September 15, 2016 09:45
dnf-search.py
#! /usr/bin/python3
import sys
import subprocess
import functools
from optparse import OptionParser
def dnf_search(keyword):
SEPARATOR = ' : '
text = subprocess.check_output(['dnf', 'search', '--all', keyword]).decode('utf-8')
prev_name = ''
@fujii
fujii / build-1.log
Created October 21, 2016 09:26
build log of WebKit WinCairo port CMake VisualStudio build
Checking for newer version of WinCairoRequirements.zip...
Located a file of type application/zip of size 33684460.
Current WinCairoRequirements is up to date.
Not searching for unused variables given on the command line.
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler using: Visual Studio 14 2015 Win64
-- Check for working C compiler using: Visual Studio 14 2015 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
@fujii
fujii / color-emoji.patch
Created March 14, 2017 10:20
test color emoji
diff --git a/Tools/gtk/jhbuild.modules b/Tools/gtk/jhbuild.modules
index e7762fa..0e9e3f2 100644
--- a/Tools/gtk/jhbuild.modules
+++ b/Tools/gtk/jhbuild.modules
@@ -93,9 +93,8 @@
<dep package="pixman"/>
<dep package="glib"/>
</dependencies>
- <branch module="releases/cairo-1.14.2.tar.xz" version="1.14.2"
- repo="cairographics.org"
@fujii
fujii / regtool.cc
Created May 17, 2017 01:55
regtool
/* regtool.cc
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include <stdio.h>
#include <stdlib.h>
@fujii
fujii / coredump of bash
Created June 9, 2017 11:54
Ryzen SEGV Challenge
fujii@ubuntu $ gdb =bash core
GNU gdb (Ubuntu 7.12.50.20170314-0ubuntu1) 7.12.50.20170314-git
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
@fujii
fujii / gdb log
Last active June 27, 2017 09:43
bash segfault on Ryzen
fujii@ubuntu $ gdb $(which bash) core
GNU gdb (Ubuntu 7.12.50.20170314-0ubuntu1) 7.12.50.20170314-git
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
@fujii
fujii / dmesg
Created July 10, 2017 23:09
coredump of Ryzen without uOP cache
[15957.331831] bash[41106]: segfault at 6dfb44 ip 00000000004370d0 sp 00007ffe43330ae0 error 6 in bash[400000+100000]
[19287.277512] bash[104437]: segfault at 6dfb44 ip 00000000004370d0 sp 00007fff06795430 error 6 in bash[400000+100000]
[19287.277681] bash[104536]: segfault at 6dfb44 ip 00000000004370d0 sp 00007ffde6199940 error 6 in bash[400000+100000]