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
package com.snaphop.util; | |
import static com.google.common.base.Preconditions.checkState; | |
import java.io.Reader; | |
import java.util.Iterator; | |
import javax.xml.bind.JAXBContext; | |
import javax.xml.bind.JAXBElement; |
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
package com.snaphop.aop; | |
import static org.junit.Assert.*; | |
import org.junit.Before; | |
import org.junit.Test; | |
public class JSR305Test { |
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
package com.snaphop.util; | |
import static com.google.common.collect.Iterators.transform; | |
import java.io.IOException; | |
import java.io.Reader; | |
import java.net.URI; | |
import java.net.URISyntaxException; | |
import java.util.Iterator; | |
import java.util.List; |
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
package com.snaphop.jooq; | |
import java.sql.Connection; | |
import java.sql.SQLException; | |
import java.sql.Statement; | |
import javax.sql.DataSource; | |
import org.jooq.ExecuteContext; | |
import org.jooq.impl.DefaultExecuteListener; |
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
/* | |
* Copyright 2009-2012 The MyBatis Team | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
# bash completion for the Mercurial distributed SCM | |
# Docs: | |
# | |
# If you source this file from your .bashrc, bash should be able to | |
# complete a command line that uses hg with all the available commands | |
# and options and sometimes even arguments. | |
# | |
# Mercurial allows you to define additional commands through extensions. | |
# Bash should be able to automatically figure out the name of these new |
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
package com.snaphop.util; | |
import javax.annotation.Nullable; | |
public class AppendableDecorator { | |
protected final CharSequence nullText; | |
protected final CharSequence newLine; | |
protected final boolean skipNull; |
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
package com.snaphop.util; | |
/* | |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/util/URIUtil.java,v 1.27 2004/05/05 20:34:01 olegk Exp $ | |
* $Revision: 507321 $ | |
* $Date: 2007-02-14 01:10:51 +0100 (Wed, 14 Feb 2007) $ | |
* | |
* ==================================================================== | |
* |
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
server { | |
listen 30080; | |
root /home/maven/public; | |
index index.html index.htm; | |
server_name my.host.name; | |
access_log /var/log/nginx/localhost.access.log; | |
location / { |
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
#!/usr/bin/env python | |
## Turns a SELECT sql statement into INSERT statements | |
## for copying into another database server with the same table. | |
## The SELECT statement should select all the columns. | |
## pgAdmin III will create a SELECT statement with all the columns by | |
## right clicking on a table and selecting 'Scripts->SELECT' | |
## The statement should come from STDIN. So you can dom something like $ cat some.sql | select2insert.py | |
## http://stackoverflow.com/questions/1820650/sql-script-to-create-insert-script/10392124#10392124 | |
import fileinput | |
import re |