Skip to content

Instantly share code, notes, and snippets.

;;;; -*- mode: emacs-lisp; coding: iso-2022-7bit -*-
;; 文字コードの設定
(set-language-environment "Japanese")
(prefer-coding-system 'utf-8-unix)
(set-default-coding-systems 'utf-8-unix)
(setq file-name-coding-system 'sjis)
(setq locale-coding-system 'utf-8)
;; フォント設定
@torutk
torutk / appendcsv.bat
Last active February 11, 2018 03:11
append multiple csv file with eliminating top line from each file but except for 1st file.
@echo off
rem 複数のcsvファイルを1つのcsvファイルに結合する。
rem その際、2番目以降のCSVファイルは先頭行を除去する。
rem 本バッチファイルのあるディレクトリをカレントディレクトリにする
cd /d %~dp0
rem 結合ファイル
set resultfile=result.csv
@torutk
torutk / setjdk.bat
Last active December 9, 2021 07:36
Setting oracle jdk path using registory for Windows command prompt
@echo off
:: ==========================================================
:: Windows(64bit) batch file tor set environment variables
:: JAVA_HOME and PATH for Oracle JDK or OpenJDK.
::
:: For Oracle JDK, search JDK installed path from Windows registory.
:: For OpenJDK, search JDK installed path from directory name under
:: OPENJDK_BASE directory specified in this batch file. (needs to
:: customize your configuration)
@torutk
torutk / Get-MsiDatabaseProperties.ps1
Last active March 12, 2016 02:52
PoweShell Cmdlet to show properties of Windows Installer MSI file, such as ProductName, ProductVersion, ProductCode, UpgradeCode...
Function Get-MsiDatabaseProperties() {
<#
.SYNOPSIS
This function retrieves properties from a Windows Installer MSI database.
.DESCRIPTION
This function uses the WindowInstaller COM object to pull all value from
the Property table from a MSI
.EXAMPLE
Get-MsiDatabaseProperties 'MSI_PATH'
.PARAMETER FilePath
@torutk
torutk / oracle-jdk-alternatives.sh
Created December 9, 2013 22:45
Setting alternatives for Oracle JDK on Linux.
#!/bin/bash
#
# Setting alternatives for Oracle JDK
#
JAVA_BASE=/usr/java/latest
JDK_BIN=$JAVA_BASE/bin
JRE_BIN=$JAVA_BASE/jre/bin
# check root permission
if [[ $EUID -ne 0 ]]; then
@torutk
torutk / List by @since doclet for javadoc
Created December 8, 2013 06:44
Javadoc doclet code to print a list of Java standard APIs' class name and method name which is add since Java SE 8.
/*
* Javadoc用docletクラスを作成する。
* 次の@sinceタグのものだけリストアップする。
* @since 1.8
* @since 8
* @since JDK1.8
* sinceタグの抽出方法は、ClassDoc/MethodDOcのtags("@since")を呼出しTag[]を取得する。
*
* 注意点
* - コンパイル時にJDKのtools.jarをクラスパスに追加する(com.sun.javadocパッケージを使用するため)