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 Attributes { | |
private final Map<String, Set<String>> attributes; | |
public Attributes() { | |
this.attributes = new HashMap<>(); | |
} | |
public boolean attributeExists(String attributeName) { | |
return attributes.containsKey(attributeName); | |
} |
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 Item { | |
private final Attributes attributes; | |
public Item(Attributes attributes) { | |
this.attributes = attributes; | |
} | |
public boolean attributeExists(String attributeName) { | |
return attributes.attributeExists(attributeName); | |
} |
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
# /etc/profile.d/maven-settings.sh Maven related stuff | |
export M2_HOME=/usr/local/apache-maven/apache-maven-3.2.1 | |
export M2=$M2_HOME/bin | |
export PATH=$M2:$PATH |
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
# /etc/profile.d/java-settings.sh | |
OLD | |
# export JAVA_HOME=/usr/java/jdk1.7.0_51 | |
# export PATH=$JAVA_HOME/bin:$PATH | |
export JAVA_HOME=/usr/java/jdk1.8.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
# Basic | |
git config --global alias.st status | |
git config --global alias.co checkout | |
git config --global alias.ci commit | |
git config --global alias.br branch | |
# Branches | |
git config --global alias.buf "checkout -b" | |
git config --global alias.puf "push -u origin" |
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
### Java ### | |
*.class | |
# Package Files # | |
*.jar | |
*.war | |
*.ear | |
### IntelliJ ### | |
*.iml |
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
# /etc/profile.d/pgsql-data-settings.sh | |
export PGDATA=/usr/local/pgsql/data |
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
// The code | |
public static <T, V> Collection<V> safeGetCollectionFromMap(Map<T, ? extends Collection<V>> map, T key) { | |
if (map.get(key) != null) { | |
return map.get(key); | |
} else { | |
return Lists.newLinkedList(); | |
} | |
} | |
// The tests |
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
# create a new branch out of current branch | |
git checkout -b <NEW_FEATURE_BRANCH_NAME> | |
# share the branch | |
git push -u origin <BRANCH_NAME> | |
# show all branches | |
git remote show origin | |
# Delete remotely |
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
<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/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId> put the group id </groupId> | |
<artifactId> put the artifact id </artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<name> the name </name> |