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
version: "3.8" | |
services: | |
################### | |
nginx-proxy: | |
image: nginx:1.23-alpine | |
container_name: nginx-proxy | |
ports: | |
- "80:80" |
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
// Jenkins: Cleanup GitPlugin Build Data | |
// reference: https://plugins.jenkins.io/git/#remove-git-plugin-buildsbybranch-builddata-script | |
// Jenkins Console: https://{jenkins_host}/script | |
import hudson.matrix.* | |
import hudson.model.* | |
hudsonInstance = hudson.model.Hudson.instance | |
jobNames = hudsonInstance.getJobNames() | |
allItems = [] |
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
// Jenkins: Limit the number of builds per job | |
// reference: https://support.cloudbees.com/hc/en-us/articles/215549798-Best-Strategy-for-Disk-Space-Management-Clean-Up-Old-Builds | |
// Jenkins Console: https://{jenkins_host}/script | |
def daysToKeep = -1 | |
def numToKeep = 7 | |
def artifactDaysToKeep = -1 | |
def artifactNumToKeep = 7 | |
Jenkins.instance.getAllItems(AbstractItem.class).each { |
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 | |
help () { | |
echo 'Usage: sh aws_mfa.sh "$mfa_arn" $mfa_code'; | |
echo "\nWhere:" | |
echo ' - $mfa_arn, is aws arn to the mfa device found in iam profile' | |
echo ' - $mfa_code, is code generated by mfa device' | |
} | |
if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then |
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
<?php | |
# Fill our vars and run on cli | |
# $ php -f db-connect-test.php | |
$dbname = 'name'; | |
$dbuser = 'user'; | |
$dbpass = 'pass'; | |
$dbhost = 'host'; | |
$link = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'"); |