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 report | |
{ | |
num="$1" | |
chrome $(sqlplus -S username/password@connect_identifier <<EOF | |
set echo off | |
set verify off | |
set timing off | |
set heading off | |
set feedback off | |
set linesize 32767 |
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 | |
# EXAMPLE 1, BY DAY (default delimiter space) | |
# otus.decare.com:/logs/foster/WebLogic/DDS_Prod/claimservices > ~/bin/count-log-events.sh " MapMessage received" *.out | |
# 2016-08-11 35306 | |
# | |
# EXAMPLE 2, BY HOUR (delimiter colon) | |
# otus.decare.com:/logs/foster/WebLogic/DDS_Prod/claimservices > ~/bin/count-log-events.sh -F: " MapMessage received" *.out | |
# 2016-08-11 02 6501 | |
# 2016-08-11 03 3529 | |
# 2016-08-11 04 13221 |
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
/usr/bin/find /var/mail/yourself -mtime -1 -size +600c | /bin/egrep '.*' > /dev/null && (from | grep -v 'FOLDER INTERNAL DATA' | /usr/bin/mail -s Summary yourself@gmail.com) |
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
PATH: | |
A. bash - Edit /etc/paths | |
B. apps - sudo launchctl config user path $PATH | |
OTHER: | |
https://diaryproducts.net/EnvPane |
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
public static void main(String[] args) throws Exception { | |
String uri = "pom.xml"; | |
if (args.length > 0) { | |
uri = args[0]; | |
} | |
String path = "/project/version/text()"; | |
if (args.length > 1) { | |
path = args[1]; | |
} | |
if (!path.startsWith("/")) { |
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 play { | |
local wav=`cygpath -W`/Media/$1.wav | |
if [ -f "$wav" ]; then | |
cp "$wav" /dev/dsp | |
else | |
echo "$wav" not found | |
fi | |
} | |
function tada { |
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 devssh | |
{ | |
for i in nova regal saab paxton; do | |
ssh $i "$@" | |
done | |
} | |
function devpull | |
{ | |
devssh "(cd weblogic; git pull)" |
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
$awk -F: '/logMessageOfInterest/ {counts[$1] = counts[$1] + 1; } END { for (val in counts) print val, counts[val]; }' LOG.TXT | sort |
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
/** | |
* Add a package name prefix if the name is not absolute Remove leading "/" | |
* if name is absolute | |
*/ | |
private String resolveName(String name) { | |
... | |
} |
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
@RunWith(Parameterized.class) | |
public class GroovySystemTest { | |
@Parameters(name = "{0}") | |
public static Collection<Object[]> data() throws Exception { | |
Collection<Object[]> data = new ArrayList<Object[]>(); | |
ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(true); | |
provider.addIncludeFilter(new AssignableTypeFilter(Script.class)); |