Skip to content

Instantly share code, notes, and snippets.

View pete911's full-sized avatar
🏠
Working from home

Peter Reisinger pete911

🏠
Working from home
View GitHub Profile
@pete911
pete911 / rest response codes
Created January 10, 2013 17:34
diagram of rest response codes
http://i.stack.imgur.com/whhD1.png
@pete911
pete911 / tomcat monitoring
Last active April 8, 2017 13:59
monitoring tomcat
https://wiki.internet2.edu/confluence/display/CPD/Monitoring+Tomcat+with+JMX
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8999
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=localhost
@pete911
pete911 / count number of lines
Created February 4, 2013 09:58
counts number of lines recursively in a directory (replace . for directory name if you don't want to search current dir)
find . -type f | xargs wc -l
@pete911
pete911 / deb package content
Last active December 16, 2015 01:09
List the contents of a debian package.
# very close to the dpkg -L command except the package does not need to be installed
apt-file list package_name
@pete911
pete911 / enable debug on tomcat
Last active December 16, 2015 16:58
enable debug on tomcat
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
@pete911
pete911 / find with grep
Last active December 17, 2015 19:39
find with grep
find . -type f -name 'some-file.xml' -print0 | xargs -0 grep -niH 'something'
@pete911
pete911 / maven update version
Last active December 18, 2015 04:49
maven - udpate dependencies to latest version
# -Dincludes specifies that only spring dependencies should be udpated
mvn -U versions:use-latest-versions -Dincludes=org.springframework:*
@pete911
pete911 / hiring hacks for startup
Created June 13, 2013 12:40
hiring hacks for startup
http://recruitloop.com/blog/hiring-hacks-for-startups/
@pete911
pete911 / big O
Created June 25, 2013 15:30
big O cheat sheet
http://bigocheatsheet.com/
@pete911
pete911 / tomcat manager deploy
Last active October 12, 2022 19:13
tomcat - deploy war files using curl
# deploy under "path" context path
curl --upload-file appplication-0.1-1.war "http://tomcat:tomcat@localhost:8080/manager/deploy?path=/application-0.1-1
# undeploy
curl "http://tomcat:tomcat@localhost:8080/manager/undeploy?path=/application-0.1-1"
# ! tomcat7 uses /manager/text/undeploy and /manager/text/deploy paths
# tomcat6-admin (debian) or tomcat6-admin-webapps (rhel) has to be installed
# tomcat-users.xml has to be setup with user that has admin, manager and manager-script roles