Skip to content

Instantly share code, notes, and snippets.

View jyukutyo's full-sized avatar

Koichi Sakata jyukutyo

View GitHub Profile
@jyukutyo
jyukutyo / application.yml
Created July 13, 2016 07:10
embedded HornetQ
spring:
hornetq:
host: localhost
port: 5445
mode: embedded
embedded:
enabled: true
queues: queue/hoge
@jyukutyo
jyukutyo / build.gradle
Created May 2, 2016 07:29
Gradleに含まれるAntのバージョンを出力する
task antVersion << {
//デフォルトのantオブジェクトのプロパティ集をMapで入手
def m = ant.getProperties()
//ant.versionをキーに取得
println(m.get('ant.version'))
}
@jyukutyo
jyukutyo / build.gradle
Created March 10, 2016 07:26
GradleからAnt呼び出し
ant.importBuild "build.xml"
configurations {
antConf
}
repositories {
mavenCentral()
}
@jyukutyo
jyukutyo / hornetQClient.groovy
Created February 23, 2016 05:37
HornetQ Directly instantiating JMS Resources without using JNDI
@Grapes([
@Grab(group='org.hornetq', module='hornetq-native', version='2.4.7.Final'),
@Grab(group='org.hornetq', module='hornetq-core-client', version='2.4.7.Final'),
@Grab(group='org.hornetq', module='hornetq-jms-client', version='2.4.7.Final'),
@Grab(group='jboss', module='jnp-client', version='4.2.2.GA'),
@Grab(group='javax.jms', module='jms', version='1.1')
])
import javax.jms.*
import org.hornetq.api.core.*
import org.hornetq.core.remoting.impl.netty.*
@jyukutyo
jyukutyo / amazonurl.js
Created November 6, 2015 02:09
Amazonのページで書籍タイトルとURLを出すブックマークレット
javascript:(function(){var a=document.location.href.split('/');prompt('Amazon URL',document.getElementById('productTitle').innerText + ' http://'+a[2]+'/dp/'+a[5]);})();
@jyukutyo
jyukutyo / outlook macro
Created February 20, 2015 05:58
post mail body by http request
Option Explicit
Const BOT_URL = "http://example.com"
Public Sub Run(Item As Outlook.MailItem)
Say (Item.Body)
End Sub
'==================================================
'UrlEncodeUtf8: 文字列をUTF-8でエンコードするFunction
@jyukutyo
jyukutyo / httpd.coffee
Created February 20, 2015 05:54
messages irc channel by recieving http request
querystring = require('querystring')
module.exports = (robot) ->
robot.router.get "/hubot/say", (req, res) ->
query = querystring.parse(req._parsedUrl.query)
envelope = room: "#" + query.c
robot.send envelope, query.m
res.end "Said #{query.m} to channel #{query.c}"
@jyukutyo
jyukutyo / runhubot.sh
Last active August 29, 2015 14:15
run hubot which messages to irc channel
#!/bin/bash
export HUBOT_IRC_SERVER="irc.example.com"
export HUBOT_IRC_PORT="9999"
export HUBOT_IRC_USERNAME="hubot"
export HUBOT_IRC_ROOMS="#hubot,#hoge"
export HUBOT_IRC_NICK="hubot"
# export HUBOT_IRC_SEND_NOTICE_MODE=true
export PORT="9001"
@jyukutyo
jyukutyo / Notes.md
Last active August 29, 2015 14:07 — forked from chrisvest/Notes.md

About PrintCompilation

This note tries to document the output of PrintCompilation flag in HotSpot VM. It was originally intended to be a reply to a blog post on PrintCompilation from Stephen Colebourne. It's kind of grown too big to fit as a reply, so I'm putting it here.

Written by: Kris Mok [email protected]

Most of the contents in this note are based on my reading of HotSpot source code from OpenJDK and experimenting with the VM flags; otheres come from HotSpot mailing lists and other reading materials listed in the "References" section.

This

@jyukutyo
jyukutyo / gist:7700089
Created November 29, 2013 00:49
抽選するための画面
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="./jquery-2.0.3.min.js"></script>
<link rel="stylesheet" href="./css/bootstrap.min.css">
<style>
.text {
font-size: 100px;
}