Skip to content

Instantly share code, notes, and snippets.

Jay lakemove

Block or report user

Report or block lakemove

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lakemove
lakemove / ti-svn-structure.sh
Created Mar 28, 2013
showcase svn automated operations and invoking Java from shell script
View ti-svn-structure.sh
#!/bin/bash
WORKDIR=/tmp/svn-work-dir
mkdir $WORKDIR && cd $WORKDIR
svn info svn+ssh://subversion.evenex.com/svn/comp/OutgoingDocumentReceiveService/branches/FDD-4256 >/dev/null
if [ $? -eq 0 ]; then
echo "branch already exist, delete it [y/n](y)?"
svn rm svn+ssh://subversion.evenex.com/svn/comp/OutgoingDocumentReceiveService/branches/FDD-4256 -m "delete to create"
fi
@lakemove
lakemove / jgit.sh
Created Mar 21, 2013
self-executable shell commandline shamelessly copied from [jgit|http://www.eclipse.org/jgit/download/]
View jgit.sh
cmd=
for a in "$@"
do
case "$a" in
-*) continue ;;
*) cmd=$a; break; ;;
esac
done
use_pager=
@lakemove
lakemove / blog-app.conf
Created Oct 29, 2012
node upstart script
View blog-app.conf
description "blog-app server"
author "Jay"
start on startup
stop on shutdown
script
#Your scripts
cd /home/jay/works/blog-app
@lakemove
lakemove / web
Created Oct 25, 2012
The essence of this technique
View web
//pure-CSS drop down menus
div.menu-bar ul ul {
display: none;
}
div.menu-bar li:hover > ul {
display: block;
}
//image pre-loader
function preloadImages() {
@lakemove
lakemove / hudson-run.sh
Created Aug 8, 2012
script to bootstrap hudson in tomcat
View hudson-run.sh
#/bin/bash
export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_25
export CATALINA_HOME=/usr/lib/apache-tomcat-7.0.26
export CATALINA_BASE=/srv/hudson-ci
export HUDSON_HOME=/srv/hudson-ci/hudson-home
export PATH=$JAVA_HOME/bin:$PATH
# see http://stackoverflow.com/questions/76327/how-can-i-prevent-java-from-creating-hsperfdata-files
# to disable it , use "-XX:-UsePerfData" ,
@lakemove
lakemove / commands.sh
Last active Oct 7, 2015
useful shell commands
View commands.sh
# tcpdump ldap traffic to a file, then can be analyzed by wireshark
sudo tcpdump -vv -w /tmp/ldapdump -i lo port 389
#sniff http traffic
sudo ngrep -q -d eth0 -W byline host example.com and port 8180
#Search recursively to find a word or phrase in certain file types, such as C code
find . -name "*.[ch]" -exec grep -i -H "search pharse" {} \; | column -t -s ":"
#search empty folder
@lakemove
lakemove / commandline.bat
Created Jun 14, 2012
customized windows commandline
View commandline.bat
@ECHO OFF
doskey ls=dir /b $*
rem Java
set JAVA_HOME=C:\opt\jdk1.6.0_25
set Path=%JAVA_HOME%\bin;%Path%
rem Maven
set MVN_HOME=C:\opt\apache-maven-3.0.4
@lakemove
lakemove / pom.xml
Created Jun 9, 2012
maven pom.xml basic structure
View pom.xml
<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>org.liulijie</groupId>
<artifactId>blog-app</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
You can’t perform that action at this time.