Skip to content

Instantly share code, notes, and snippets.

@hiroisojp
hiroisojp / deepracer-submit.js
Last active September 27, 2019 05:17
DeepRacer Submit Sample Chromeでユーザを作成し、一度ログインする必要があります。(画像認証が要求されるため)
'use strict'
const puppeteer = require('puppeteer')
/**
* @param {Object} event
* @param {Object} context Contextオブジェクト
* @param {function} callback コールバックオプション
*/
exports.handler = async (event, context, callback) => {
@hiroisojp
hiroisojp / choose-from-git-notifyCommit-script.groovy
Created September 24, 2015 10:10
jenkins git pluginのnotifyCommitで取得されるブランチ情報からDBスキーマを振り分ける
import hudson.model.*
def thr = Thread.currentThread()
def build = thr?.executable
def buildData = build.getActions(hudson.plugins.git.util.BuildData.class).first()
def lastBuild = buildData.lastBuild
def revision = lastBuild.revision
println lastBuild
@hiroisojp
hiroisojp / dynamic choise parameter script.groovy
Last active August 29, 2015 14:00
jenkins build parameter git tag with dynamic parameter plugin.
def cmd = "git ls-remote -t [git repository]"
def proc = cmd.execute()
proc.text.readLines()
.findAll{ t -> !t.endsWith('^{}') }
.collect{ t -> t.split().last() }
@hiroisojp
hiroisojp / DefaultMethodTest.java
Created May 11, 2013 14:33
java8 default method test.
package com.hiroisojp.java8.defaultmethod;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
/**
* 以下の環境で検証
* OS:MaxOSX 10.8.3
@hiroisojp
hiroisojp / HogeLogic.java
Last active December 12, 2015 07:29
WebLogicのWorkManagerを用いたSpringのTaskExecutorの設定の仕方。 productionモードの場合は、WebLogic上のリソースを利用する。 動作はするが、並列処理する場合、WorkManager経由の場合、slf4j(logback)のMDCの値が取得できないよう。
public interface HogeLogic {
public Object execute(String param);
}
@Component
public class HogeLogic1 implements HogeLogic {
private static final Logger LOGGER = LoggerFactory.getLogger(HogeLogic1.class);
@Override