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" standalone="no"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.oracle.roo.jdbc</groupId> | |
<artifactId>com.oracle.roo.jdbc.ojdbc6</artifactId> | |
<packaging>bundle</packaging> | |
<version>11.2.0.3</version> | |
<name>com-oracle-roo-jdbc</name> | |
<description>This bundle wraps the standard Maven artifact: ${pkgArtifactId}-${pkgVersion}.</description> | |
<properties> |
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.lang.reflect.Constructor; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.ParameterizedType; | |
import org.hamcrest.Matcher; | |
import org.hamcrest.Matchers; | |
import org.junit.Assert; | |
import org.mockito.Mockito; | |
import org.mockito.MockitoAnnotations; | |
import org.mockito.stubbing.OngoingStubbing; |
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
def echo = System.out.&println | |
def url = new URL('%YOUR_URL_HERE%') | |
def conn = url.openConnection() | |
conn.useCaches = false | |
conn.doInput = true | |
conn.doOutput = true | |
def formData = """\ | |
var1:blah |
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.goodercode; | |
import static org.hamcrest.CoreMatchers.equalTo; | |
import static org.hamcrest.CoreMatchers.not; | |
import static org.junit.Assert.assertThat; | |
import java.lang.reflect.ParameterizedType; | |
import java.lang.reflect.TypeVariable; | |
import org.junit.Before; |
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 class RegexMatcher extends BaseMatcher{ | |
private final String regex; | |
public RegexMatcher(String regex){ | |
this.regex = regex; | |
} | |
public boolean matches(Object o){ | |
return ((String)o).matches(regex); |
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"?> | |
<persistence xmlns="http://java.sun.com/xml/ns/persistence" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" | |
version="2.0"> | |
<persistence-unit name="pu"> | |
<provider>org.hibernate.ejb.HibernatePersistence</provider> | |
<properties> | |
<!-- Auto detect annotation model classes --> |
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
<?php | |
define('URL_PREFIX', 'http://gamercard.xbox.com/en-US/'); | |
define('URL_AFFIX', '.card'); | |
define('SUBSCRIPTION_GOLD', 'Gold'); | |
define('SUBSCRIPTION_SILVER', 'Silver'); | |
class XboxGamercard { | |
public $gamertag; |
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
Function.prototype.curry = function(scope) { | |
scope = scope || window; | |
var cargs = []; | |
for (var i=1, len = arguments.length; i < len; ++i) { | |
cargs.push(arguments[i]); | |
} | |
var m = this; | |
return function() { | |
var args = []; | |
for (var i=0, len = cargs.length; i < len; ++i) { |
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
String.metaClass.div = { f -> delegate + File.separator + f } | |
def extensions = ['.jpg','.css','.js','.jsp'] | |
def source = new File( args.length > 0 ? args[0] : '.' ).absolutePath | |
def dest = new File( args.length > 1 ? args[1] : discoverJBoss() ).absolutePath | |
println "Monitoring ${source}" | |
println "Any modified files will be copied to ${dest}" | |
def files = buildFileList(source, extensions) |
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
def path1 = new File(args[0]).absolutePath | |
def path2 = new File(args[1]).absolutePath | |
def different = compareDirs(path1, path2) | |
different.files.each { | |
println it.from | |
new AntBuilder().copy ( file: it.from.absolutePath, tofile : it.to.absolutePath ) | |
} | |
println different.files.size() + ' of ' + different.count |
NewerOlder