This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
中心となるスクリプトファイルは、 | |
convert_to_masked.sh | |
作業中に、 | |
/home/ubuntu/dbbackup | |
/home/ubuntu/masked | |
を使う。 | |
この中で使用しているSQLは、 | |
maskdata.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class RegexpSample { | |
/** 英数字の1文字以上5文字以下 */ | |
private static final String REGEX = "[0-9a-z]{1,5}"; | |
/** | |
* 正規表現を満たすかどうかの判定メソッド |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static org.junit.Assert.assertEquals; | |
import org.junit.Test; | |
public class EscapeHtmlTest { | |
/** | |
* 引数で与えられた文字列にHTMLエスケープを行った結果文字列を返す | |
* | |
* @param str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void configureByResource(URL url) throws JoranException { | |
if (url == null) { | |
throw new IllegalArgumentException("URL argument cannot be null"); | |
} | |
if (url.toString().endsWith("groovy")) { | |
if (EnvUtil.isGroovyAvailable()) { | |
// avoid directly referring to GafferConfigurator so as to avoid | |
// loading groovy.lang.GroovyObject . See also http://jira.qos.ch/browse/LBCLASSIC-214 | |
GafferUtil.runGafferConfiguratorOn(loggerContext, this, url); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import javax.servlet.ServletException; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import javax.servlet.http.HttpSession; | |
public class SesFixaGuardFirstServlet extends HttpServlet { | |
private static final long serialVersionUID = 1L; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 59dcb10a3f800ee766388e8484484845bbb800ed Mon, 11 Apr 2011 17:36:52 +0900 | |
From: taichi <ryushi@gmail.com> | |
Date: Mon, 11 Apr 2011 17:33:49 +0900 | |
Subject: [PATCH] add comment. | |
diff --git a/src/test/java/com/basho/riak/client/Hosts.java b/src/test/java/com/basho/riak/client/Hosts.java | |
index 9904504..aed4a9e 100644 | |
--- a/src/test/java/com/basho/riak/client/Hosts.java | |
+++ b/src/test/java/com/basho/riak/client/Hosts.java | |
@@ -1,3 +1,16 @@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static org.junit.Assert.assertNotSame; | |
import java.security.MessageDigest; | |
import org.junit.Test; | |
public class P327Test { | |
/** ハッシュアルゴリズム */ | |
private static final String ALG = "SHA-256"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.commons.pool2.PoolableObjectFactory; | |
import org.apache.commons.pool2.impl.GenericObjectPool; | |
public class PoolTest { | |
public static void main(String[] args) throws Exception { | |
GenericObjectPool<PooledObject> pool = new GenericObjectPool<PoolTest.PooledObject>( | |
new F()); | |
pool.addObject(); | |
pool.addObject(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import org.codehaus.jackson.JsonEncoding; | |
import org.codehaus.jackson.JsonFactory; | |
import org.codehaus.jackson.JsonGenerator; | |
import org.codehaus.jackson.map.ObjectMapper; | |
import org.codehaus.jackson.node.ArrayNode; | |
import org.codehaus.jackson.node.ObjectNode; | |
public class JacksonSample { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class RiakFilterCodeGenerator { | |
public static void main(String[] args) { |