Skip to content

Instantly share code, notes, and snippets.

View knope's full-sized avatar

knope knope

View GitHub Profile
@dansmith65
dansmith65 / Install-AWSCLIV2.ps1
Created August 23, 2022 01:33
Install version 2 of AWS CLI via PowerShell
# https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
$dlurl = "https://awscli.amazonaws.com/AWSCLIV2.msi"
$installerPath = Join-Path $env:TEMP (Split-Path $dlurl -Leaf)
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest $dlurl -OutFile $installerPath
Start-Process -FilePath msiexec -Args "/i $installerPath /passive" -Verb RunAs -Wait
Remove-Item $installerPath
$env:Path += ";C:\Program Files\Amazon\AWSCLIV2"
// Name: get_job_details_by_name.groovy
// Author: Garima Damani
// ---------------------------------------------------------------
// This script gets the below job details with the given job name:
// *Full name
// *Last build number
// *Last build time
// *Last build cause
// *Last success build number
// *Last result
@gene1wood
gene1wood / all_aws_lambda_modules_python.md
Last active May 7, 2024 11:49
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7
@ctran
ctran / check-slave-jar-version.groovy
Last active May 9, 2023 12:21
Check slave.jar versions of slaves against expected version on Jenkins master
import jenkins.model.*
import hudson.remoting.Launcher
import hudson.slaves.SlaveComputer
def expectedVersion = Launcher.VERSION
for (computer in Jenkins.instance.getComputers()) {
if (! (computer instanceof SlaveComputer)) continue
if (!computer.getChannel()) continue
def version = computer.getSlaveVersion()
@azadkuh
azadkuh / vim-cheatsheet.md
Last active May 3, 2024 11:50
vim / vimdiff cheatsheet - essential commands

Vim cheat sheet

Starting Vim

vim [file1] [file2] ...

@micw
micw / install_jenkins_plugin.sh
Last active August 11, 2023 06:14
Script to install one or more jenkins plugins including dependencies while jenkins is offline
#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "USAGE: $0 plugin1 plugin2 ..."
exit 1
fi
plugin_dir=/var/lib/jenkins/plugins
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@hummus
hummus / gist:8592113
Last active April 26, 2024 19:45
aws cli + jq example
wget http://stedolan.github.io/jq/download/linux64/jq
aws ec2 describe-instances --filters "Name=tag:Name,Values=$NAME" \
"Name=instance-state-name,Values=running" \
| jq -r \
".Reservations[] | .Instances[] | .InstanceId" \
aws ec2 describe-volumes --filters \
"Name=status,Values=available" \
| jq -r ".Volumes[] | .VolumeId" \
@endolith
endolith / Has weird right-to-left characters.txt
Last active April 30, 2024 12:48
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶