Skip to content

Instantly share code, notes, and snippets.

View baskaran-md's full-sized avatar
🎯
Focusing

Baskaran Deivasigamani baskaran-md

🎯
Focusing
View GitHub Profile
@baskaran-md
baskaran-md / gist:7d77fa6bdc016bd22d8e
Last active August 29, 2015 14:04
Jenkins Console Log File Parser - To find the time taken by each test module
ts_get_sec()
{
read -r h m s <<< $(echo $1 | tr ':' ' ' )
echo $(((h*60*60)+(m*60)+s))
}
## MAIN GOES HERE ##
LOG_FILE=$1
@baskaran-md
baskaran-md / gist:11203963
Last active August 29, 2015 14:00
Python Encoder [Apigee]
from com.apigee.util import Crypto
authHeader = flow.getVariable("request.formparam.user") + ":" + flow.getVariable("request.formparam.password");
encodedValue = Crypto.base64encode(authHeader);
flow.setVariable("request.header.Authorization", "Basic " + encodedValue);