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
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |
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/env python | |
import requests | |
URL='https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/us-east-1/index.csv' | |
lines = requests.get(URL).text.split('\n')[6:] | |
for type in sorted(set([s[18] for s in [ l.split('","') for l in lines ] if len(s)>18 and s[18] and '.' in s[18]])): | |
print(type) |
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/awk -f | |
function help() { | |
print "Scripts detects and optionally extracts SQL statements among with " | |
print "binding variables and execution time from Siebel component's logfile." | |
print "Extraction is much slower - where applicable, run detection first" | |
print "to confirm there are interesting statements in the log." | |
print "TOP5 identified by following criterias:" | |
print " - most frequent statement" | |
print " - slowest statement" | |
print " - most time consuming statement (accumulated execution time)" |
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 | |
# Extracts login records from archived (.tar.gz) Siebel logs. | |
SERVER=server | |
DIR=/app/siebel/siebsrvr/enterprises/ENTPR | |
FILTER="*eCommunicationsObjMgr_sve*" | |
for FILE in `ssh siebel@$SERVER "find $DIR -name \"archive*.tar.gz\"|grep -E \"archive_201212(17|18|19|20|21)\""` | |
do ssh siebel@$SERVER "cat $FILE"|gunzip -c -|tar xOpf - --include "$FILTER" 2>/dev/null|grep 'Authentication name'|grep -v -E '(APPUSER|MON_CSR)'|awk '{print $5" "$6" "$10}' | |
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
#!/bin/env bash | |
# Looks for running siebel enterprise server log file | |
# of given system user and scans previous hour for signs of process crashes. | |
# | |
# 20140123 [email protected] | |
if [ "$#" -lt 2 ]; then | |
echo "Usage: $0 <user> <tz> [-verbose]" | |
echo " user - system user running Siebel enterprise" | |
echo " tz - adjusted timezone to cover previous hour (CET+0)" |
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
USER='siebel' lsof -u $USER -a -c siebsvc|grep -e '.*\.log$'|awk '{print $(NF)}' |
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
((date; curl -s localhost:7777/server-status|grep '<tr><td>'|sed -r 's/.*<\/b><\/td><td>([0-9]{2,}).*/\1/g'|sort|uniq)|tr '\n' '|'; echo) >> /tmp/apache.pids |
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 | |
/opt/local/bin/curl -v -H 'Content-Type: application/json' -X POST http://echo.httpkit.com -d @- <<'EOF' | |
{"test": 123, "aaa": 333} | |
EOF |
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
1) Ensure the Siebel Server Service and Web Server services are offline | |
2) Run gtwysrvr\siebenv.sh | |
3) Stop the Gateway Server service (stop_ns) | |
4) Copy svc.gtwyns. in $SIEBEL_ROOT/gtwysrvr/sys to backup.svc.gtwyns.old | |
5) Delete the svc.gtwyns. file | |
6) Run the command siebctl -S gtwyns -a -g "/f $SIEBEL_ROOT/sys/siebns.dat /t 2320" substituting the port number for the Gateway Server service in place of 2320. | |
7) Start the Siebel Gateway service (start_ns) | |
8) Type list_ns |
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
LoadModule fastcgi_module modules/mod_fastcgi.so | |
<IfModule mod_fastcgi.c> | |
# URIs that begin with /fcgi-bin/, are found in /var/www/fcgi-bin/ | |
Alias /fcgi-bin/ /var/www/fcgi-bin/ | |
# Anything in here is handled as a "dynamic" server if not defined as "static" or "external" | |
<Directory /var/www/fcgi-bin/> | |
SetHandler fastcgi-script |
NewerOlder