Skip to content

Instantly share code, notes, and snippets.

View kai2nenobu's full-sized avatar

Tsunenobu Kai kai2nenobu

View GitHub Profile
@kai2nenobu
kai2nenobu / ThisIsTestOfGist.sh
Created June 25, 2012 13:52
This is a test of gist
#!/bin/sh
# This is a test of gist
echo This is a test of Gist
@kai2nenobu
kai2nenobu / percol_toggle_two_finder.py
Created November 21, 2012 09:18
percol_toggle_two_finder
def toggle_two_finders(self, finder_class1, finder_class2):
if self.model.finder.__class__ == finder_class1:
self.model.remake_finder(finder_class2)
else:
self.model.remake_finder(finder_class1)
self.model.force_search()
@kai2nenobu
kai2nenobu / chinachu-vlc.png
Last active August 29, 2015 14:03
Chinachuで録画した番組をpercolで選択して再生する
chinachu-vlc.png
@kai2nenobu
kai2nenobu / YaTeX-define-begend-key-with-name.el
Last active August 29, 2015 14:08
yatexのbegin-end型のコマンドに名前をつける
(defun YaTeX-define-begend-key-with-name (key env &optional map)
"Define YaTeX-make-begin-end command with name and bind it."
(let ((func (intern (format "YaTeX-make-begin-end-%s" env))))
(fset func
`(lambda (arg)
,(format "Make LaTeX environment command of \\begin{%s} ... \\end{%s}."
env env)
(interactive "P")
(YaTeX-insert-begin-end ,env arg)))
(YaTeX-define-key key func map)))
@kai2nenobu
kai2nenobu / how_to_build_nkf_with_mingw.md
Last active November 8, 2017 05:26
nkfをMinGWでビルドする方法

MinGWは cinst mingw でインストールしている前提。nkfのバージョンは2.1.4。

> C:\tools\mingw64\bin\mingw32-make.exe CC=C:\tools\mingw64\bin\gcc.exe CFLAGS="-g -O2 -Wall -pedantic -DDEFAULT_NEWLINE=0x0D0A -DDEFAULT_CODE_WINDOWS_31J"

MinGWには make コマンドと cc という名前のコマンドは存在しないので、代替のコマンドを指定する。CCMakefile 内の変数なので、make の引数で指定すれば上書きできる。

gccの -Dmacro オプションでマクロを上書きできる。DEFAULT_NEWLINE がデフォルト出力の改行文字、DEFAULT_CODE_WINDOWS_31J はデフォルトの出力エンコーディングが Windows-31J になる。

@kai2nenobu
kai2nenobu / docker-tramp-init.el
Last active December 18, 2017 11:15
docker-tramp.el 設定ファイル
(set-language-environment "Japanese")
(prefer-coding-system 'utf-8)
;(setq url-proxy-services '(("http" . "localhost:8888") ("https" . "localhost:8888")))
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(package-refresh-contents)
(package-install 'docker-tramp)
(require 'docker-tramp-compat)
@kai2nenobu
kai2nenobu / README.md
Last active February 14, 2018 21:23
gemojiから絵文字とUnicodeコードポイントの対応表を作る
@kai2nenobu
kai2nenobu / MyPackage.ps1
Last active February 10, 2019 01:29
Boxstarterのパッケージ例
# エクスプローラーの設定
$ExplorerOptions = @{
# 表示詳細設定>ファイルおよびフォルダー>ファイルとフォルダーの表示
EnableShowHiddenFilesFoldersDrives=$true
# 表示詳細設定>ナビゲーションウィンドウ>開いているフォルダーまで展開
EnableExpandToOpenFolder=$false
# 全般>エクスプローラーで開く(クイックアクセス/PC)
EnableOpenFileExplorerToQuickAccess=$false
# 表示詳細設定>ファイルおよびフォルダー>登録されいている拡張子は表示しない
DisableShowFileExtensions=$false
@kai2nenobu
kai2nenobu / Update-AUPackages.md
Last active January 31, 2025 13:40
Update-AUPackages Report #powershell #chocolatey
@kai2nenobu
kai2nenobu / Update-AUPackages.md
Last active May 17, 2025 08:11
Update-AUPackages Report #powershell #chocolatey