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 | |
# nexusdeb builds a debian package of the Nexus repository manager. nexusdeb | |
# downloads nexus by itself. You run it by | |
# nexusdeb.sh <version> <maintainer> | |
# Example: | |
# nexusdeb.sh 2.0.5 "Denny Colt <d.colt@eisner.qcg>" | |
# | |
# The script has been tested with version 2.0.5. | |
if [ -z $1 ] |
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 | |
#install Java 7 | |
add-apt-repository -y ppa:webupd8team/java | |
apt-get -y update | |
apt-get -y install oracle-java7-installer | |
#install tomcat, which uses Java 7 | |
apt-get -y install tomcat7 | |
sed -i 's/#JAVA_HOME/JAVA_HOME/' /etc/default/tomcat7 |
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 | |
# playdeb builds a debian package of the play framework. playdeb downloads | |
# the playframework by itself. You run it by | |
# playdeb.sh <version> <maintainer> | |
# Example: | |
# playdeb.sh 1.2.3 "Denny Colt <d.colt@eisner.qcg>" | |
# | |
# The script has been tested with version 1.2.3. | |
if [ -z $1 ] |
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
<form:errors path="a" cssClass="alert alert-error" element="div"/> | |
<form:errors path="*" cssClass="alert alert-error" element="div" delimiter='</div><div class="alert alert-error">'/> |
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
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end | |
import static org.junit.rules.ExpectedException.none; | |
public class ${NAME} { | |
@Rule | |
public final ExpectedException thrown = none(); | |
} |
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
[Desktop Entry] | |
Type=Application | |
Name=IntelliJ IDEA | |
Comment=IntelliJ Integrated Development Environment | |
Icon=/opt/idea/bin/idea128.png | |
Exec=/opt/idea/bin/idea.sh | |
Terminal=false | |
StartupWMClass=Intellij_IDEA | |
Categories=Development;IDE;Java; |
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
-- replace myfield1, myfield2 and mytable with appropriate names | |
select COUNT(*) AS num, myfield1, myfield2 from mytable group by myfield1, myfield2 HAVING COUNT(*) > 1; |
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 | |
grep -Rl "a href=" dirname | while read item | |
do | |
sed -i 's/<a href=".*">\(.*\)<\/a>/\1/' $item | |
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
#!/bin/bash | |
fgrep -Rl "EasyMock" testsrc | fgrep -v ".svn" | while read item | |
do | |
sed -i 's/org.easymock.EasyMock.createNiceMock/org.mockito.Mockito.mock/g' $item | |
sed -i 's/org.easymock.EasyMock.createMock/org.mockito.Mockito.mock/g' $item | |
sed -i 's/org.easymock.EasyMock.expect/org.mockito.Mockito.when/g' $item | |
sed -i 's/org.easymock.EasyMock/org.mockito.Mockito/g' $item | |
sed -i 's/EasyMock/Mockito/g' $item | |
sed -i 's/createNiceMock/mock/g' $item | |
sed -i 's/createMock/mock/g' $item |
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/sh | |
#adds the line 'the new first line' at the beginning of file 'filename' | |
sed -i '1 i\the new first line' filename |