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 cmpany { i=(); while read x; do for j in ${i[@]}; do echo "$j vs. $x"; cmp $j $x; done; i+=("$x"); done; } |
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
currentBranch="$(git branch -q --no-column --no-color | grep '^*' | awk '{print $2}')"; | |
for branch in $(git branch -q --no-column --no-color | sed -e 's/^*/ /'); do | |
git rebase origin/${branch} ${branch} --onto origin/${branch}; | |
done | |
git co ${currentBranch} | |
unset currentBranch |
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
s | |
| | |
assertNotNull\((?:\s*([^,;$]+))\s*\) | |
| | |
assertThat\($1, notNullValue\(\)\) | |
| |
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
## deletes all "fork/*" branches on remote | |
git push fork -f $(for i in $(git branch -r | grep "fork/"); do echo :$(echo $i | sed -e 's/fork\///'); done) |
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
// see https://github.com/bmuschko/gradle-docker-plugin/blob/master/build.gradle | |
jar { | |
manifest { | |
attributes 'Implementation-Title': 'Gradle Docker plugin', | |
'Implementation-Version': version, | |
'Built-By': System.getProperty('user.name'), | |
'Built-Date': new Date(), | |
'Built-JDK': System.getProperty('java.version'), | |
'Built-Gradle': gradle.gradleVersion | |
} |
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
// fixing setup of what idea does not automatically - see https://github.com/bmuschko/gradle-docker-plugin/blob/master/build.gradle | |
idea.project { | |
jdkName = '1.8' | |
languageLevel = compatibilityVersion | |
ipr.withXml { provider -> | |
def node = provider.asNode() | |
// Use GIT | |
def vcsConfig = node.component.find { it.'@name' == 'VcsDirectoryMappings' } |
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
#!/bin/bash | |
docker images | grep -v "^REPOSITORY"| awk '{print $1":"$2}' | tee -a scratch.$(date +%F).txt | |
for i in $(cat scratch.2017-07-18.txt); do echo docker pull $i; done > scratch.$(date +%F).restore.sh | |
echo -e "\n[DONE] For Restore please execute: scratch.$(date +%F).restore.sh" | |
chmod +x ./scratch.$(date +%F).restore.sh |
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' | |
// apply the runtimeClasspath from "test" sourceSet to the new one | |
// to include any needed assets: test, main, test-dependencies and main-dependencies | |
sourceSets { | |
integrationTest { | |
compileClasspath += sourceSets.test.runtimeClasspath | |
// somehow this redeclaration is needed, but should be irrelevant | |
// since runtimeClasspath always expands compileClasspath | |
runtimeClasspath += sourceSets.test.runtimeClasspath |
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
allprojects { | |
sourceCompatibility = JavaVersion.VERSION_1_8 | |
tasks.withType(JavaCompile) { task -> | |
// nicify "invalid source release: 1.8" message: | |
task.doFirst { | |
if (("$System.env.JAVA_HOME".trim().isEmpty() || System.env.JAVA_HOME == null) && ("$System.env.JDK_HOME".trim().isEmpty() || System.env.JDK_HOME == null)) { | |
println ' WARNING: neither JAVA_HOME nor JDK_HOME set!' | |
} | |
if (!JavaVersion.current().equals(project.sourceCompatibility)) { |
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
<datasources xmlns="http://www.jboss.org/ironjacamar/schema" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.jboss.org/ironjacamar/schema http://docs.jboss.org/ironjacamar/schema/datasources_1_0.xsd"> | |
<datasource jndi-name="java:jboss/datasources/myapp-ds" | |
pool-name="myapp-ds" enabled="true" jta="true" use-java-context="true"> | |
<connection-url>url>jdbc:hsqldb:file:d:\myapp</connection-url> | |
<driver>hsqldb</driver> | |
<pool> | |
<prefill>false</prefill> | |
<use-strict-min>false</use-strict-min> |