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 | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
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 | |
JENKINS_SERVER=http://my_jenkins_server | |
JOB=$1 | |
JOB_QUERY=/job/${JOB} | |
BUILD_STATUS_QUERY=/lastBuild/api/json | |
JOB_STATUS_JSON=`curl --silent ${JENKINS_SERVER}${JOB_QUERY}${BUILD_STATUS_QUERY}` | |
CURRENT_BUILD_NUMBER_QUERY=/lastBuild/buildNumber |
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
#https://JENKINS_URL/user/username/configure -> API Token | |
#token_auth under BuildItem -> Configure -> Build Trigger -> Trigger builds remotely | |
curl -X POST https://{api_token_name}:{api_token}@JENKINS_URL/job/item/buildWithParameters?token={token_auth}&PARAM=value1&PARAM2=value2 |
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
<# | |
Only has use when system wide display & sleep policy are enforced by admin (work laptop) | |
script will move the cursor & hit the cap lock every 14 minutes to prevent laptop from sleep | |
#> | |
Add-Type -AssemblyName System.Windows.Forms | |
while ($true) |