<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="true"
locationURI="popup:org.eclipse.ui.popup.any?after=additions">
<command
commandId="org.eclipse.search.ui.openFileSearchPage"
label="File Search..."
style="push">
<visibleWhen
checkEnabled="true">
</visibleWhen>
</command>
</menuContribution>
</extension>
Rants and ravings of a semi-autistic developer who has a hard time remembering idiotic nonsense details. Why remember it, when you know where to find it.
Wednesday, July 6, 2016
Eclipse Search File in Popup Menu - Eclipse Mars 4.5.
Creating a File Menu in Eclipse...
Tuesday, June 14, 2016
TIBCO BW/BE get all the global variables in a project
Go in the root of your project (where .beproject / .designtimelib lives):
find . -type f -exec grep '%%' {} \; | perl -ne '@x =m!.+%%([\/\w]*)%%.+$!xmi; printf "%s\n", $x[0] if $x[0] !~ /^\s*$/;' | sort | uniq
and then making markers for all the variables in the cdd
$ cat LegacyEvents.cdd | perl -ne '@x =m!(.+)%%([\/\w]*)%%(.+)$!xmi; if (@x) { printf "%s\$\{%s\}%s\n", $x[0], $x[1], $x[2];} else { print $_; }'
Tuesday, May 31, 2016
Eclipse 4.5 - Mars - OSX - can't open my workspace - not responding
Try starting it with -clean, if that doesn't work try deleting .metadata/.plugins/org.eclipse.e4.workbench/ contents.
Friday, May 13, 2016
Inspecting TIBCO BE and BW ear files after build ear or studio tools
[ ! -f "${1}" ] && echo "$0: missing archive as argument." && exit 1;
[ -d ./ear ] && rm -fr ./ear
mkdir ear
cd ear
CWD=`pwd`
unzip ../${1}
unzip *.ear
mkdir sar par lib bar
cd $CWD/par
[ -f ../*.par ] && unzip ../*.par
cd $CWD/sar
[ -f ../*.sar ] && unzip ../*.sar
cd $CWD/bar
[ -f ../be.jar ] && unzip ../be.jar
cd $CWD/lib
[ -f ../lib.zip ] && unzip ../lib.zip
Friday, April 1, 2016
A poor mans software network sniffer for *niX - lsof / TCP
Substitute the _PID_ with your process id that you would like to monitor.
$(while (true) do sleep 15; /usr/sbin/lsof -p $_PID_ | grep TCP > /tmp/`date +%s`.log ;done ;) &Result after a while
[user@pje24062 tmp]$ grep 'squid' *.log grep: akf: Permission denied 1459530489.log:java 11363 gimsown 57u IPv6 96397107 0t0 TCP pje24062.mycompany.com:54179->east.mycompany.com:squid (CLOSE_WAIT) 1459530489.log:java 11363 gimsown 58u IPv6 96604834 0t0 TCP pje24062.mycompany.com:36237->192.189.187.100:squid (ESTABLISHED) 1459530504.log:java 11363 gimsown 57u IPv6 96397107 0t0 TCP pje24062.mycompany.com:54179->east.mycompany.com:squid (CLOSE_WAIT) 1459530504.log:java 11363 gimsown 58u IPv6 96604834 0t0 TCP pje24062.mycompany.com:36237->192.189.187.100:squid (ESTABLISHED) 1459530520.log:java 11363 gimsown 57u IPv6 96397107 0t0 TCP pje24062.mycompany.com:54179->east.mycompany.com:squid (CLOSE_WAIT) 1459530520.log:java 11363 gimsown 58u IPv6 96604834 0t0 TCP pje24062.mycompany.com:36237->192.189.187.100:squid (ESTABLISHED) 1459530535.log:java 11363 gimsown 57u IPv6 96397107 0t0 TCP pje24062.mycompany.com:54179->east.mycompany.com:squid (CLOSE_WAIT) 1459530535.log:java 11363 gimsown 58u IPv6 96604834 0t0 TCP pje24062.mycompany.com:36237->192.189.187.100:squid (ESTABLISHED) 1459530550.log:java 11363 gimsown 57u IPv6 96397107 0t0 TCP pje24062.mycompany.com:54179->east.mycompany.com:squid (CLOSE_WAIT) 1459530550.log:java 11363 gimsown 58u IPv6 96604834 0t0 TCP pje24062.mycompany.com:36237->192.189.187.100:squid (ESTABLISHED) 1459530565.log:java 11363 gimsown 57u IPv6 96397107 0t0 TCP pje24062.mycompany.com:54179->east.mycompany.com:squid (CLOSE_WAIT) 1459530565.log:java 11363 gimsown 58u IPv6 96604834 0t0 TCP pje24062.mycompany.com:36237->192.189.187.100:squid (ESTABLISHED) 1459530580.log:java 11363 gimsown 57u IPv6 96397107 0t0 TCP pje24062.mycompany.com:54179->east.mycompany.com:squid (CLOSE_WAIT) 1459530580.log:java 11363 gimsown 58u IPv6 96604834 0t0 TCP pje24062.mycompany.com:36237->192.189.187.100:squid (ESTABLISHED) 1459530595.log:java 11363 gimsown 57u IPv6 96397107 0t0 TCP pje24062.mycompany.com:54179->east.mycompany.com:squid (CLOSE_WAIT) 1459530595.log:java 11363 gimsown 58u IPv6 96604834 0t0 TCP pje24062.mycompany.com:36237->192.189.187.100:squid (ESTABLISHED) 1459530610.log:java 11363 gimsown 57u IPv6 96397107 0t0 TCP pje24062.mycompany.com:54179->east.mycompany.com:squid (CLOSE_WAIT) 1459530610.log:java 11363 gimsown 58u IPv6 96604834 0t0 TCP pje24062.mycompany.com:36237->192.189.187.100:squid (ESTABLISHED) 1459530625.log:java 11363 gimsown 57u IPv6 96397107 0t0 TCP pje24062.mycompany.com:54179->east.mycompany.com:squid (CLOSE_WAIT) 1459530625.log:java 11363 gimsown 58u IPv6 96604834 0t0 TCP pje24062.mycompany.com:36237->192.189.187.100:squid (ESTABLISHED) 1459530640.log:java 11363 gimsown 57u IPv6 96397107 0t0 TCP pje24062.mycompany.com:54179->east.mycompany.com:squid (CLOSE_WAIT) 1459530640.log:java 11363 gimsown 58u IPv6 96604834 0t0 TCP pje24062.mycompany.com:36237->192.189.187.100:squid (ESTABLISHED) 1459530655.log:java 11363 gimsown 57u IPv6 96397107 0t0 TCP pje24062.mycompany.com:54179->east.mycompany.com:squid (CLOSE_WAIT) 1459530655.log:java 11363 gimsown 58u IPv6 96604834 0t0 TCP pje24062.mycompany.com:36237->192.189.187.100:squid (ESTABLISHED) 1459530670.log:java 11363 gimsown 57u IPv6 96397107 0t0 TCP pje24062.mycompany.com:54179->east.mycompany.com:squid (CLOSE_WAIT) 1459530670.log:java 11363 gimsown 58u IPv6 96604834 0t0 TCP pje24062.mycompany.com:36237->192.189.187.100:squid (ESTABLISHED) 1459530685.log:java 11363 gimsown 57u IPv6 96397107 0t0 TCP pje24062.mycompany.com:54179->east.mycompany.com:squid (CLOSE_WAIT) 1459530685.log:java 11363 gimsown 58u IPv6 96604834 0t0 TCP pje24062.mycompany.com:36237->192.189.187.100:squid (ESTABLISHED) 1459530700.log:java 11363 gimsown 57u IPv6 96397107 0t0 TCP pje24062.mycompany.com:54179->east.mycompany.com:squid (CLOSE_WAIT) 1459530700.log:java 11363 gimsown 58u IPv6 96604834 0t0 TCP pje24062.mycompany.com:36237->192.189.187.100:squid (ESTABLISHED) 1459530715.log:java 11363 gimsown 57u IPv6 96397107 0t0 TCP pje24062.mycompany.com:54179->east.mycompany.com:squid (CLOSE_WAIT) 1459530715.log:java 11363 gimsown 58u IPv6 96604834 0t0 TCP pje24062.mycompany.com:36237->192.189.187.100:squid (ESTABLISHED)
Thursday, March 31, 2016
find all the ascii files with certain pattern - the fastest way
find . -type f -exec grep -Iq 'UseConcMarkSweep' {} \; -ls
Tuesday, February 16, 2016
Starting a process remotely thru SSH
[user@prh01967.prod /home/user]$ cat startFlagsAgent.sh JAVA_HOME=/opt/java/hotspot/7/current/jre PATH=$JAVA_HOME/bin:$PATH nohup $JAVA_HOME/bin/java -jar ~/FlagsAgent-0.0.1-SNAPSHOT.jar -https > ~/agent.log & pId=$! echo "kill $pId" > ~/stop_agent.sh chmod u+x ~/stop_agent.sh 217 ssh userprh01628.prod 'bash -s' < ./startFlagsAgent.sh
Labels:
ssh
Subscribe to:
Posts (Atom)
