Skip to content

Instantly share code, notes, and snippets.

View jca02266's full-sized avatar

Koji Arai jca02266

View GitHub Profile
@jca02266
jca02266 / Module1
Last active February 17, 2021 03:03
VBA Packager
' 利用手順
'
' 事前準備
' Excel等のMS Office アプリケーションにて
' オプション → セキュリティセンター → セキュリティセンターの設定 → マクロの設定
' より、
' □ VBAプロジェクト オブジェクト モデルへのアクセスを信頼する
' にチェックをつける
'
' 1. このテキストの内容を標準モジュールに貼り付ける
@jca02266
jca02266 / PoiUtils.java
Created November 8, 2020 14:35
Apache POI Utilities
package jca02266;
import java.util.Date;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.DateUtil;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.ss.util.CellUtil;
@jca02266
jca02266 / EmbulkRunner.java
Created November 29, 2017 06:47
EmbulkEmbedサンプル
import org.embulk.EmbulkEmbed;
import org.embulk.EmbulkEmbed.Bootstrap;
import org.embulk.config.ConfigLoader;
import org.embulk.config.ConfigSource;
import java.io.File;
import java.io.IOException;
public class EmbulkRunner {
public static void main(String[] args) throws IOException {
//
// sakura用桁揃えマクロ
//
// drived from http://zenu.xrea.jp (http://zenu.xrea.jp/data/quickint.js.txt)
//
// 使い方:
// 1. このファイルを %AppData%\sakura に配置する
// 2. 桁揃えしたい範囲を選択する
// 3. ツール → 「名前を指定してマクロを実行」でこのファイルを選択する
//
@jca02266
jca02266 / make.rb
Last active September 17, 2017 23:56
sample code of tsort library
require 'tsort'
# usage
=begin
$ cat depends
t1: t2
t2: t3
t3:
t4: t1
@jca02266
jca02266 / git-svn.perl.diff
Last active August 5, 2020 04:27
git-svn: keep timestamp of git commit date when do "git svn dcommit"
--- git-svn.perl.orig 2017-07-09 03:29:19.208317700 +0900
+++ git-svn.perl 2017-07-11 23:17:29.997533800 +0900
@@ -16,6 +16,7 @@
use File::Spec;
use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/;
use Memoize;
+use POSIX qw/strftime/;
use Git::SVN;
use Git::SVN::Editor;
/*
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
package sample;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.regex.Pattern;
package sample;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.regex.Pattern;
@jca02266
jca02266 / App.gwt.xml
Last active May 15, 2018 09:06
GWT validator sample
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.7.0//EN"
"http://gwtproject.org/doctype/2.7.0/gwt-module.dtd">
<module rename-to="App">
<inherits name="com.google.gwt.user.User"/>
<inherits name="org.hibernate.validator.HibernateValidator" />
<replace-with class="sample.webapp.client.ValidatorFactory">
<when-type-is class="javax.validation.ValidatorFactory" />
</replace-with>