Skip to content

Instantly share code, notes, and snippets.

@tachesimazzoca
tachesimazzoca / README.md
Last active June 11, 2017 03:50
Using JIS Keyboard as US Keyboard on XKB

Using JIS Keyboard as US Keyboard on XKB

The command setxkbmap allows us to modify any key mapppings in user X session. However each time the input method is changed, the modified states will be reset. Since I have no clue to solve this problem, I decided to rewrite the global symbol file at my own risk.

$ cp /usr/share/X11/xkb/symbols/jp /path/to/backup/jp.default
$ patch -u /usr/share/X11/xkb/symbols/jp < js-ansi.patch

Before editing xkb resources, I highly recommend that you save the current keymap. Just save the original keymap and restore it.

@tachesimazzoca
tachesimazzoca / README.md
Last active November 18, 2017 01:52
Ubuntu 16.04 LTS + Mac OS X
@tachesimazzoca
tachesimazzoca / README.md
Last active February 13, 2019 08:42
Capistrano Custom SCM
@tachesimazzoca
tachesimazzoca / README.md
Created March 6, 2017 03:13
Python for Windows
@tachesimazzoca
tachesimazzoca / log4j-console_stdout.xml
Created November 19, 2016 03:35
Log4J Configuration
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" >
<appender name="stdout" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%m%n" />
</layout>
</appender>
@tachesimazzoca
tachesimazzoca / .gitconfig
Created November 6, 2016 15:06
Use gvim as core.editor on Git for Windows
[core]
editor = 'C:/path/to/vim74-kaoriya-win64/gvim.exe' --nofork -c 'set fenc=utf-8' +1
@tachesimazzoca
tachesimazzoca / centos-7.2_docker-engine.sh
Created November 5, 2016 11:15
Vagrant Bootstrap Scripts
#!/usr/bin/env bash
nmcli connection reload
systemctl restart network.service
# packages
yum install -y vim-enhanced git
# docker-engine
tee /etc/yum.repos.d/docker.repo <<-'EOF'
import java.io.BufferedReader
import java.io.Closeable
import java.io.File
import java.io.FileInputStream
import java.io.InputStream
import java.io.InputStreamReader
import java.nio.charset.Charset
object IOUtils {
def fileInputStream(path: String): InputStream =
@tachesimazzoca
tachesimazzoca / README.md
Last active May 5, 2019 11:36
Un*x Cheat Sheet

Un*x Cheat Sheet

tail

$ tail -f /path/to/multibyte.log | while read LINE; do echo $LINE | iconv -f <from-encoding>; done

ls

alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_31/jre/bin/java 16031 \
--slave /usr/bin/ControlPanel ControlPanel /usr/java/jdk1.6.0_31/jre/bin/ControlPanel \
--slave /usr/bin/javaws javaws /usr/java/jdk1.6.0_31/jre/bin/javaws \
--slave /usr/bin/jcontrol jcontrol /usr/java/jdk1.6.0_31/jre/bin/jcontrol \
--slave /usr/bin/jjs jjs /usr/java/jdk1.6.0_31/jre/bin/jjs \
--slave /usr/bin/keytool keytool /usr/java/jdk1.6.0_31/jre/bin/keytool \
--slave /usr/bin/orbd orbd /usr/java/jdk1.6.0_31/jre/bin/orbd \
--slave /usr/bin/pack200 pack200 /usr/java/jdk1.6.0_31/jre/bin/pack200 \
--slave /usr/bin/policytool policytool /usr/java/jdk1.6.0_31/jre/bin/policytool \
--slave /usr/bin/rmid rmid /usr/java/jdk1.6.0_31/jre/bin/rmid \