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
function parse_git_svn_revision { | |
ref1=$(__git_ps1 | sed -e "s/ (\(.*\))/(git: \1$(parse_git_dirty))/") | |
#ref1=$(parse_git_branch) | |
if [ "x$ref1" != "x" ]; then | |
ref2=$(git branch -a | grep git-svn) | |
if [ "x$ref2" != "x" ]; then | |
ref3=$(git svn info | grep Revision) | |
echo " ${ref1} (svn: r"${ref3#Revision: }") " | |
else |
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 | |
archives= find . -name '*.jar' | |
echo $archives | |
for i in `find . -name '*.jar'`; do | |
echo $i | |
jar tf $i | grep --color=always ${1} | |
#jar tf $i | |
echo | |
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
AUI().use('aui-dialog', function(A) { | |
Liferay.YourPlugin = { | |
closePopup: function() { | |
var instance = this; | |
var popup = instance._getPopup() | |
if (popup) { |
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
<state> | |
<name>approved</name> | |
<actions> | |
<notification> | |
<name>Application Approved Notification</name> | |
<description>Application Approved Notification</description> | |
<execution-type>onAssignment</execution-type> | |
<template> | |
<![CDATA[ | |
<#assign context = serviceContext.getAttribute("context")> |
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
use mysql; | |
update user set password = password ('root') where user = 'root'; | |
flush privileges; |
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
mysqladmin -u root -p password 'root' |
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 | |
if [ -n "$1" ]; then | |
for (( ; ; )) | |
do | |
echo "infinite loops [ hit CTRL+C to stop]" | |
pid=`jps | grep $1 | awk '{print $1}'` | |
echo "Getting dump from process $pid" | |
jstat -gcutil $pid 250 3 >> dump-memory-$pid.txt | |
jstack -l $pid >> dump-thread-$pid.trc |
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 [ -d $1 ] && [ -n "$1" ]; then | |
service tomcat stop | |
sleep 20 | |
tar -czvf /opt/liferay-portal-tomcat-6.0-ee-sp1/tomcat-6.0.32/logs/tomcat_logs.tgz /opt/liferay-portal-tomcat-6.0-ee-sp1/tomcat-6.0.32/logs/* | |
cp /opt/liferay-portal-tomcat-6.0-ee-sp1/tomcat-6.0.32/logs/tomcat_logs.tgz $1 | |
rm -rf /opt/liferay-portal-tomcat-6.0-ee-sp1/tomcat-6.0.32/logs/* | |
mv /opt/liferay-portal-tomcat-6.0-ee-sp1/dump* $1 | |
service tomcat start | |
/opt/liferay-portal-tomcat-6.0-ee-sp1/get-java-thread-memory-dump.sh Bootstrap | |
else |
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 | |
VOLUME=$1 | |
if [ -z $VOLUME ]; then | |
echo "You must specify the volume, like /dev/sdf" | |
exit 1; | |
fi | |
if [ ! -b $VOLUME ]; then |
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
function gitrollback() { git diff -p -R "$1"^ "$1" > "$1".rollback ;} |
OlderNewer