Skip to content

Instantly share code, notes, and snippets.

Takuro Monji monzou

Block or report user

Report or block monzou

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@monzou
monzou / HornetQClient.java
Last active Dec 26, 2015
HornetQ : Embedded + JMS + Remote Example
View HornetQClient.java
package hornetq;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.JMSException;
import javax.jms.Topic;
@monzou
monzou / auditable.rb
Last active Dec 24, 2015
Make audits when destroy
View auditable.rb
ActiveSupport.on_load(:active_record) do
module ActiveRecord
class Base
class << self
def audit_with_destroy(*args)
audit_without_destroy(*args)
after_destroy { |record| record.snap!(:action => "destroy") }
end
alias_method_chain :audit, :destroy
end
@monzou
monzou / I18nBundle.java
Created Aug 11, 2013
UTF-8 based ResourceBundle.
View I18nBundle.java
package com.usopla.gist;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.URL;
import java.net.URLConnection;
import java.security.AccessController;
@monzou
monzou / ReportOutdatedTickets.java
Last active Dec 20, 2015
Report outdated tickets from Redmine.
View ReportOutdatedTickets.java
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.core.MediaType;
import org.glassfish.jersey.filter.LoggingFilter;
@monzou
monzou / Main.java
Created Jul 31, 2013
Handlebars.java
View Main.java
package sandbox;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
import com.github.jknack.handlebars.Handlebars;
import com.github.jknack.handlebars.Template;
import com.github.jknack.handlebars.io.ClassPathTemplateLoader;
View ConfigurationLoader.java
package com.usopla.gist;
import static com.google.common.base.Preconditions.checkNotNull;
import java.io.IOException;
import java.net.URL;
import javax.annotation.Nullable;
import com.fasterxml.jackson.core.JsonParseException;
@monzou
monzou / css_splitter.rb
Created Jul 23, 2013
CSS Spliter for IE's CSS rules limits
View css_splitter.rb
# lib/css_splitter.rb
class CssSplitter
CHARSET = '@charset "UTF-8"'
def initialize(infile, outdir = File.dirname(infile))
@infile = infile
@outdir = outdir
@filenames = []
@monzou
monzou / style.css
Created Jul 1, 2013
My GMail user style sheet for Windows. Applying this to the url which starts "https://mail.google.com/mail/"
View style.css
body {
font-family: Meiryo;
}
.LW-avf {
font-family: Meiryo !important;
}
.F {
font-family: Meiryo !important;
}
@monzou
monzou / AESProtector.java
Last active Dec 19, 2015
Security Utilities
View AESProtector.java
public final class AESProtector {
private static final Configuration CONFIGURATION;
static {
try {
CONFIGURATION = ConfigurationLoader.load(Configuration.class, "aes-security-policy.yml", "default-aes-security-policy.yml");
} catch (IOException e) {
throw new RuntimeException(e);
}
}
@monzou
monzou / users_router.coffee
Last active Dec 17, 2015
My little Backbone.js framework's Router sample.
View users_router.coffee
class UsersRouter extends ResourceRouter
path: "users"
layout: "#contents"
routes:
":id": "show"
show: (id) ->
new User({id: id}).fetch success: (model) =>
@layoutView ShowView,
You can’t perform that action at this time.