Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block mikoim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mikoim /
Last active Jan 9, 2020
How to avoid "Bus error (core dumped)" when you run Firefox inside Docker container

I met "Bus error (core dumped)" when I run Firefox with Selenium to capture screenshot of web sites.

firefox -headless -screenshot
*** You are running in headless mode.
ExceptionHandler::GenerateDump cloned child ExceptionHandler::WaitForContinueSignal waiting for continue signal...
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
Unable to init server: Could not connect: Connection refused
Bus error (core dumped)
mikoim / build.log
Created Nov 9, 2019
Clear Linux OS 31530
View build.log
Mock Version: 1.4.21
ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/python2-marisa.spec'], chrootPath='/var/lib/mock/clear-python2-marisa/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8', 'CCACHE_DIR': '/var/tmp/ccache', 'CCACHE_UMASK': '002'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x7f6fbee291d0>timeout=0uid=1000gid=1000user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.qvk0c2d8:/etc/resolv.conf']unshare_net=TrueprintOutput=False)
Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.qvk0c2d8:/etc/resolv.conf']
Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '1e54c0d33e0241f59c19218ab916c646', '-D', '/var/lib/mock/clear-python2-marisa/root', '-a', '--capa
mikoim /
Last active Aug 30, 2019
WireGuard example configuration for VPN


iptables -A FORWARD -i wg0 -o YOUR_INTERFACE -s -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT


see vpn.netdev and

mikoim / mozc.spec
Created May 3, 2019
spec file for building mozc ut2 package
View mozc.spec
%global pkg mozc
%undefine _hardened_build
Name: mozc
Version: 2.23.2815.102
Release: 2%{?dist}
Summary: A Japanese Input Method Editor (IME) designed for multi-platform
License: BSD and ASL 2.0 and UCD and Public Domain and mecab-ipadic
mikoim /
Created Sep 29, 2018
Install latest fcitx4 on Fedora 28 from source
# This script does not install dependencies. You must install them before continuing.
# ref.
mikoim / alacritty-wrong-font-width-workaround.patch
Last active Jan 12, 2018
Alacritty calculates the cell width from maximum advance via freetype2. But its value is too wide with some font. So this patch makes it use the average of rasterized glyph width instead of maximum advance.
View alacritty-wrong-font-width-workaround.patch
diff --git a/src/ b/src/
index 14c5a66..a5a8980 100644
--- a/src/
+++ b/src/
@@ -239,7 +239,7 @@ impl Display {
// font metrics should be computed before creating the window in the first
// place so that a resize is not needed.
let metrics = glyph_cache.font_metrics();
- let cell_width = (metrics.average_advance + font.offset().x as f64) as u32;
+ let cell_width = (glyph_cache.true_average_width() + font.offset().x as f64) as u32;
mikoim /
Created Oct 18, 2017
Roland QUAD-CAPTURE UA-55 on Linux (PulseAudio)
#### Roland QUAD-CAPTURE UA-55
# Audio input is fucking unstable, it causes kernel to crash at least in my environment.
## OUTPUT1 (headphones)
load-module module-remap-sink sink_name=output1 remix=yes master=alsa_output.usb-Roland_QUAD-CAPTURE_000085D917665F98C210A52B1B8484F8-00.analog-surround-40 channels=2 master_channel_map=front-left,front-right channel_map=front-left,front-right
load-module module-remap-sink sink_name=output2 remix=yes master=alsa_output.usb-Roland_QUAD-CAPTURE_000085D917665F98C210A52B1B8484F8-00.analog-surround-40 channels=2 master_channel_map=rear-left,rear-right channel_map=front-left,front-right
mikoim /
Created Oct 5, 2017
Optimize all png files in history of repository with "git filter-branch" command
HASH=$(md5sum "${FILENAME}")
HIT=$(grep -c "${HASH}" /tmp/hash.txt)
echo "${FILENAME}"
if [ "${HIT}" -eq 0 ];then
optipng -o7 -clobber "${FILENAME}"
View conoha_vps_2GB.txt
# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 3
On-line CPU(s) list: 0-2
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 3
NUMA node(s): 1
You can’t perform that action at this time.