Skip to content

Instantly share code, notes, and snippets.

View taktos's full-sized avatar

Toshio Takiguchi taktos

View GitHub Profile
@taktos
taktos / Vagrantfile
Created September 1, 2014 09:00
Vagrantfile for CentOS 5.10 + Ansible
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
$script = <<SCRIPT
if ! [ `which ansible` ]; then
rpm --import http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/RPM-GPG-KEY-EPEL-5
wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm -O /tmp/epel-release-5-4.noarch.rpm
@taktos
taktos / mvn clean install sonar:sonar
Created August 12, 2014 01:48
sonar-jacoco-issue log
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building sonar-jacoco-issue 0.0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ sonar-jacoco-issue ---
[INFO] Deleting C:\projects\oss\sonar\sonar-jacoco-issue\target
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.1.201405082137:prepare-agent (pre-test) @ sonar-jacoco-issue ---
@taktos
taktos / DBFlute with JodaTime.md
Last active December 27, 2015 04:09
DBFlute で MySQL のDATE型をJoda-TimeのLocalDateにマッピングする

DBFlute で MySQL のDATE型をJoda-TimeのLocalDateにマッピングする

やること

  • Java
  • TnAbstractValueType を継承したValueTypeを作り、java.sql.Dateとorg.joda.time.LocalDateの変換を実装する
  • DBFluteInitializerを継承し、prologue()をオーバーライドして、DBFluteConfig#registerBasicValueType() でLocalDateに対するValueTypeを登録する
  • dfprop
  • typeMappingMap.dfprop で、DATEをorg.joda.time.LocalDateにマッピングする
@taktos
taktos / com.google.gdt.eclipse.designer.xml
Created July 23, 2013 08:10
GWT Designer palette data of GWT-Bootstrap components.
<?xml version="1.0" encoding="UTF-8"?>
<commands>
<addCategory
id="custom_1374565425793"
name="GWT Bootstrap"
description="http://gwtbootstrap.github.io"
visible="true"
open="true"/>
<addComponent
id="com.github.gwtbootstrap.client.ui.Abbreviation_1374565475652"
@taktos
taktos / TakeApart.groovy
Created December 12, 2012 12:06
DBFluteのload-data-reverseで出力したExcelを1テーブル1ファイルに分解するGroovyスクリプト
@Grab('org.apache.poi:poi:3.9')
import org.apache.poi.hssf.usermodel.*
def config = [
reverseDir : 'output/doc/data',
dataDir : 'playsql/data/ut/xls',
tableNameMap: 'tableNameMap.dataprop',
ignoreTable : [
'ignore_table_name',
],
@taktos
taktos / Log.php
Created May 22, 2012 02:15
PHP tail viewer
<?php
/**
* Require the library
*/
require 'PHPTail.php';
/**
* Initilize a new instance of PHPTail
* @var PHPTail
*/
$tail = new PHPTail("/path/to/log");
@taktos
taktos / gist:1867928
Created February 20, 2012 04:56
findbugs japanese localization script for sonar-l10n-ja-plugin
def findbugs = new XmlParser().parse('http://findbugs.googlecode.com/svn/trunk/findbugs/etc/findbugs.xml')
def messages = new XmlParser().parse('http://findbugs.googlecode.com/svn/trunk/findbugs/etc/messages_ja.xml')
def dir = new File('findbugs_ja')
dir.mkdirs()
java.util.Properties prop = new Properties()
findbugs.BugPattern.each { bug->
def category = messages.BugCategory.find{ it['@category'] == bug['@category'] }.Description.text()
def msg = messages.BugPattern.find{ it['@type'] == bug['@type'] }