Skip to content

Instantly share code, notes, and snippets.

View akirak's full-sized avatar
🕊️
Living in peace

Akira Komamura akirak

🕊️
Living in peace
View GitHub Profile
@akirak
akirak / ddskk-usage.org
Last active May 30, 2021 17:41
How to use DDSKK, Japanese input method for Emacs

How to Use DDSKK Japanese Input Method for Emacs

This tutorial describes the basic usage of DDSKK Japanese input method for Emacs.

Installation and configuration

Install ddskk package.

Turn on skk-mode minor mode to write Japanese. It is recommended that you should bind a key to this command:

@akirak
akirak / .emacs
Created January 4, 2018 04:11
An example of minimal initialization file for Emacs with straight package manager
(setq custom-file "~/.custom.el")
;; Install straight.el
;; Just pasted from https://github.com/raxod502/straight.el#getting-started
(let ((bootstrap-file (concat user-emacs-directory "straight/repos/straight.el/bootstrap.el"))
(bootstrap-version 3))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
@akirak
akirak / add-manning-to-calibre.bash
Created July 18, 2017 12:12
A tiny shell script to add a book in your Manning library (on Dropbox) to your calibre library using fzf
#!/bin/bash
python <<PYTHON | fzf -m | xargs -d'\n' calibredb add
import os.path
import glob
root = os.path.expanduser('~/Dropbox/Apps/Manning Books')
files = glob.glob(os.path.join(root, '**/*.epub'))
result = sorted(list(map(lambda f: (f, os.path.getctime(f)), files)), key=lambda t: t[1], reverse=True)
candidates = list(map(lambda f: f[0], result))
for c in candidates:
@akirak
akirak / ping-gce.txt
Last active February 23, 2017 06:12
ping to various server locations
# Google Compute Engine asia-east-a micro
❯ ping -c 9 107.167.188.160
PING 107.167.188.160 (107.167.188.160) 56(84) bytes of data.
64 bytes from 107.167.188.160: icmp_seq=1 ttl=60 time=11.4 ms
64 bytes from 107.167.188.160: icmp_seq=2 ttl=60 time=11.1 ms
64 bytes from 107.167.188.160: icmp_seq=3 ttl=60 time=11.1 ms
64 bytes from 107.167.188.160: icmp_seq=4 ttl=60 time=11.0 ms
64 bytes from 107.167.188.160: icmp_seq=5 ttl=60 time=11.1 ms
64 bytes from 107.167.188.160: icmp_seq=6 ttl=60 time=13.1 ms
@akirak
akirak / 0_reuse_code.js
Created January 2, 2014 00:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console