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 com.google.common.collect.ForwardingSetMultimap; | |
import com.google.common.collect.LinkedHashMultimap; | |
import com.google.common.collect.Multimap; | |
import com.google.common.collect.SetMultimap; | |
import java.util.Locale; | |
import java.util.Map; | |
import java.util.Set; | |
/** SetMultimap decorator that coverts keys to lower case before delegation */ | |
public class CaseInsensitiveSetMultimap<V> extends ForwardingSetMultimap<String, V> { |
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
# Applicable in : Java statement | |
# Reformat according to style : true | |
# Use static import if possible: true | |
# Shorten FQ names : true | |
# | |
# Do nothing about "Edit variables". I wasn't able to define defaults like "expected" and "actual". | |
org.junit.Assert.assertEquals($EXPECTED$, $ACTUAL$); | |
$END$ |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.7] | |
"JavaHome"="C:\\tools\\java-7" | |
"MicroVersion"="0" |
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.File; | |
import org.junit.Test; | |
import static org.assertj.core.api.Assertions.*; | |
public class FileTest { | |
@Test | |
public void file() { | |
File actualFile = new File("actual.txt"); |
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
# start the services passed as arguments | |
function nst { for s in "$@"; do net start $s; done } | |
# stop the services passed as arguments | |
function nsp { for s in "$@"; do net stop $s; done } | |
# restart the services passed as arguments | |
function nrs { | |
# Stop in reverse order | |
for ((i=$#; i>0; i--)); do net stop ${!i}; 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
// Splitting an empty string returns an array with an empty string | |
assert "".split(";") == [""] | |
// Splitting a string consisting of just the delimiter returns an empty array | |
assert ";".split(";") == [] | |
// Trailing delimiters are ignored | |
assert "1;;2;;".split(";") == ["1", "", "2"] | |
// ... but the behavior becomes consistent with a -1 extra argument | |
assert ";".split(";", -1) == ["", ""] | |
assert "1;;2;;".split(";", -1) == ["1", "", "2", "", ""] |
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
set incsearch | |
set hlsearch | |
set ignorecase | |
set smartcase | |
set tabstop=4 shiftwidth=4 expandtab | |
set clipboard=unnamed |
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
<object type="$obj_type$"> | |
<$tag$/> | |
<property> | |
<$tag2$/> | |
<customtag name="poll"/> | |
<$tag3$/> | |
</property> | |
<$tag4$/> | |
</object> |
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 bash | |
# Runs a command in a given directory and preserves the $? of the command | |
# Example: "runin /src/project mvn install" | |
function runin { | |
pushd $1 | |
shift | |
"$@" | |
local STATUS=$? | |
popd |
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 org.jboss.as.server; | |
import java.util.concurrent.ConcurrentSkipListSet; | |
import org.jboss.as.server.deployment.DeploymentPhaseContext; | |
import org.jboss.as.server.deployment.DeploymentUnit; | |
import org.jboss.as.server.deployment.DeploymentUnitProcessingException; | |
import org.jboss.as.server.deployment.DeploymentUnitProcessor; | |
import org.jboss.as.server.deployment.Phase; | |
import org.jboss.as.server.deployment.SubDeploymentProcessor; | |
import org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor; |
OlderNewer