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
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> | |
<bean id="name1" class="java.lang.String"> | |
<constructor-arg value="tcp://test?foo=bar&foo2=bar2"/> | |
</bean> | |
<bean id="name2" class="java.lang.String"> | |
<constructor-arg><value>tcp://test?foo=bar&foo2=bar2</value></constructor-arg> |
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
# Add this in your $HOME/.hgignore to have it affect all hg projects globally. | |
syntax: glob | |
target/* | |
.settings/* | |
.project | |
.classpath |
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
<!-- Build helper plugin adds additional classpath into test phase (test) --> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>build-helper-maven-plugin</artifactId> | |
<version>1.7</version> | |
<executions> | |
<execution> | |
<phase>process-resources</phase> | |
<configuration> | |
<resources> |
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
<%@ page import="java.io.*,java.util.*,javax.script.*" %> | |
<% | |
// A script console jsp for Java | |
// Last modified: Zemian Deng <[email protected]> 05/15/2014 | |
ScriptEngineManager factory = new ScriptEngineManager(); | |
// Get all the script engine names available by inspecting the classpath | |
List<String> scriptEngineNames = new ArrayList<String>(); | |
for (ScriptEngineFactory fac : factory.getEngineFactories()) { |
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
<HTML> | |
<HEAD> | |
<TITLE>JBossAS7 JSP snoop page</TITLE> | |
<%@ page import="javax.servlet.http.HttpUtils,java.util.Enumeration" %> | |
<%@ page import="java.lang.management.*" %> | |
<%@ page import="java.util.*" %> | |
</HEAD> | |
<BODY> | |
<H1>WebApp JSP Snoop page</H1> |
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 Profile script | |
# Zemian Deng 07/03/2012 | |
# | |
export EASYANT_HOME=$HOME/apps/easyant | |
export JAVA_HOME=$HOME/apps/jdk | |
export PATH=$JAVA_HOME/bin:\ | |
$HOME/apps/maven/bin:\ |
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 smtplib | |
message = """From: [email protected] | |
To: [email protected] | |
Subject: SMTP e-mail test | |
This is a test e-mail message. | |
""" | |
s = smtplib.SMTP('smtp.mycompany.com') |
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
// groovy -cp $HOME/.m2/repository/com/h2database/h2/1.3.166/h2-1.3.166.jar groovySql | |
// http://groovy.codehaus.org/Tutorial+6+-+Groovy+SQL | |
// Grab will not load the driver! but at least we can trigger it to download it and then use groovy -cp option to run this script. | |
// @Grab('com.h2database:h2:1.3.166') | |
import groovy.sql.Sql | |
sql = Sql.newInstance( | |
'jdbc:h2:~/test', |
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
Show hidden characters
// A build script to run shell script in Windows using cygwin. | |
// NOTE that a selector is "source.shell", not ".sh"! | |
{ | |
"cmd": ["C:/cygwin/bin/bash.exe", "--login", "$file"], | |
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", | |
"selector": "source.shell" | |
} |
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
apply plugin: 'java' | |
repositories { mavenCentral() } | |
dependencies { | |
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.1' | |
compile group: 'com.google.guava', name: 'guava', version: '13.0.1' | |
testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3' | |
testCompile group: 'junit', name: 'junit-dep', version: '4.10' | |
} |
OlderNewer