Skip to content

Instantly share code, notes, and snippets.

View chabala's full-sized avatar
👹
at large

Greg Chabala chabala

👹
at large
View GitHub Profile
@chabala
chabala / .gitignore
Last active August 29, 2015 13:56
.gitignore template
target
.classpath
.project
.settings
.idea
.idea_modules
*.ipr
*.iws
*.iml
*.ids
@chabala
chabala / mvn-ojdbc6.sh
Last active August 29, 2015 13:56
Four ways to get foreign jars into Maven, in order of preference
#deploy to repo with pom
mvn -Durl=scpexe://yourrepo/maven2 \
-Dfile=ojdbc6-11.2.0.3.0.jar \
-DgroupId=com.oracle -DartifactId=ojdbc6 \
-Dversion=11.2.0.3.0 -Dpackaging=jar \
-DpomFile=ojdbc6-11.2.0.3.0.pom \
deploy:deploy-file
#deploy to repo and generate pom
mvn -Durl=scpexe://yourrepo/maven2 \
@chabala
chabala / .bash_aliases
Last active August 29, 2015 14:01
.bash_aliases
alias pgrep='pgrep -fa'
alias pkill='pkill -fe'
alias cless='/usr/share/vim/vim74/macros/less.sh'
@chabala
chabala / gist:3a11624d4ea9ffb97160
Created March 28, 2015 04:57
lego website internals
java.lang.NullPointerException
com.lego.locale.LocaleUtils.getCountryCode(LocaleUtils.java:204)
com.lego.mim.servlet.LEGOURIPrefixMappingServlet.redirectToOverrideIfNeeded(LEGOURIPrefixMappingServlet.java:282)
com.lego.mim.servlet.LEGOURIPrefixMappingServlet.existingUserOnUnknownLocale(LEGOURIPrefixMappingServlet.java:140)
com.lego.servlet.URIPrefixMappingServlet.service(URIPrefixMappingServlet.java:72)
atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
atg.userprofiling.ProfileRequestServlet.service(ProfileRequestServlet.java:461)
com.lego.userprofiling.LegoProfileRequestServlet.superService(LegoProfileRequestServlet.java:92)
com.lego.userprofiling.LegoProfileRequestServlet.service(LegoProfileRequestServlet.java:88)
atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:267)
@chabala
chabala / install-svn.sh
Last active August 29, 2015 14:19
Install SVN 1.6 in Ubuntu (don't ask why)
#!/usr/bin/env bash
sudo echo 'deb http://us.archive.ubuntu.com/ubuntu precise main' >> /etc/apt/sources.list
sudo apt-get update
sudo apt-get install subversion=1.6.17dfsg-3ubuntu3 libsvn1=1.6.17dfsg-3ubuntu3
@chabala
chabala / .gitignore_global
Created July 15, 2015 20:56
.gitignore_global
*.jar
.idea
@chabala
chabala / vizfile.xml
Created May 12, 2016 18:46
Using Visant to graph Ant target dependencies
<project name="vizfile" default="main">
<taskdef name="vizant"
classname="net.sourceforge.vizant.Vizant"
classpath="${user.home}/.m2/repository/net/sourceforge/vizant/vizant/0.1.2/vizant-0.1.2.jar"/>
<target name="main">
<vizant antfile="./build.xml" outfile="build.dot">
<attrstmt type="graph">
<attr name="ranksep" value="1.2"/>
<attr name="nodesep" value="0.5"/>
</attrstmt>
@chabala
chabala / idea.sh
Last active June 9, 2016 16:00
IntelliJ IDEA wrapper script. Gives a layer of indirection between a desktop icon and actual startup script.
#!/usr/bin/env bash
# IntelliJ IDEA startup script wrapper
export JAVA_HOME="/usr/lib/jvm/java-8-oracle"
export IDEA_JDK=$JAVA_HOME
export M2_HOME="/usr/local/apache-maven/apache-maven-3.3.9"
export M2=$M2_HOME/bin
#cd idea-IU-129.713/bin/
@chabala
chabala / oracle.sh
Created July 7, 2016 14:57
/etc/profile.d/oracle.sh
export ORACLE_HOME=/usr/lib/oracle/12.1/client64
export TNS_ADMIN=$ORACLE_HOME/network/admin
@chabala
chabala / clearMergedNotifications.sh
Last active October 24, 2016 22:10
Clear notifications for merged PRs on GitHub
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o xtrace
#requires curl and jq
auth="Authorization: token YOUR_SECRET_OAuth_TOKEN"
declare -i pages