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/expect -f | |
# | |
# Usage: <scriptname> <username> <existingpassword> <newpassword> <servername/host> | |
set timeout 10 | |
set username [lindex $argv 0] | |
set password [lindex $argv 1] | |
set newpassword [lindex $argv 2] | |
set serverid [lindex $argv 3] | |
spawn ssh -a -oIdentitiesOnly=yes -oStrictHostKeyChecking=no $username@$serverid |
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 | |
## | |
# Auto wrapper to decrypt "super-secure" saved passwords for Oracle SQL Developer 19.x+ | |
# | |
# Author: Lazy Jason.Alexander | |
# Date: 20230110 | |
# | |
# Requires: sqldeveloperpassworddecryptor (install via pip) or see https://github.com/maaaaz/sqldeveloperpassworddecryptor | |
# |
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
for (aSlave in hudson.model.Hudson.instance.slaves) { | |
println('===================='); | |
println('Name: ' + aSlave.name); | |
println('getLabelString: ' + aSlave.getLabelString()); | |
println('getNumExectutors: ' + aSlave.getNumExecutors()); | |
println('getRemoteFS: ' + aSlave.getRemoteFS()); | |
println('getMode: ' + aSlave.getMode()); | |
println('getRootPath: ' + aSlave.getRootPath()); | |
// println('getDescriptor: ' + aSlave.getDescriptor()); | |
println('getComputer: ' + aSlave.getComputer()); |
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
grep -v "rem_address" /proc/net/tcp | awk 'function hextonum(str, ret, n, i, k, c) {if (str ~ /^0[xX][0-9a-fA-F]+$/) {str = substr(str, 3);n = length(str);ret = 0;for (i = 1; i <= n; i++) {c = substr(str, i, 1);c = tolower(c);k = index("123456789abcdef", c);ret = ret * 16 + k}} else ret = "NOT-A-NUMBER";return ret} {y=hextonum("0x"substr($2,index($2,":")-2,2));x=hextonum("0x"substr($3,index($3,":")-2,2));for (i=5; i>0; i-=2) {x = x"."hextonum("0x"substr($3,i,2));y = y"."hextonum("0x"substr($2,i,2));} print y":"hextonum("0x"substr($2,index($2,":")+1,4))" "x":"hextonum("0x"substr($3,index($3,":")+1,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
alias dockandbash='docker run --rm -ti --entrypoint /bin/bash ' | |
alias forward80='socat tcp-l:80,fork,reuseaddr tcp:127.0.0.1:8080' | |
alias cleardns='sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder' | |
alias clearaws='unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN' | |
alias aws_whoami='aws sts get-caller-identity' | |
alias aws_config_mgr_parameters="aws ssm get-parameters-by-path --path /ced/live/ --recursive | jq \'.Parameters[] | select(.Name) | {name: .Name, value: .Value}\'" | |
alias psa='ps auxww|grep ' | |
alias hog='du -I".." -sk .* *|sort -n' | |
alias ll='ls -la' | |
alias tf='terraform' |
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 | |
# https://raygun.com/blog/git-aliases/ | |
# unstage files | |
git config --global alias.unstage 'reset HEAD --' | |
# stash changes including untracked files | |
git config --global alias.stash-unstaged 'stash -k -u' | |
# switch to previous branch |
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://stackoverflow.com/questions/918886/how-do-i-split-a-string-on-a-delimiter-in-bash | |
#!/usr/bin/env bash | |
IN="example@example;struff@stuff" | |
# Do something with each element separated by ; | |
IFS=';' read -ra ADDR <<< "$IN" | |
for i in "${ADDR[@]}"; do | |
# process "$i" | |
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
/* First we need to listen to touch events and call a function 'touch2Mouse' each time a touch event is fired: | |
*/ | |
document.addEventListener("touchstart", touch2Mouse, true); | |
document.addEventListener("touchmove", touch2Mouse, true); | |
document.addEventListener("touchend", touch2Mouse, true); | |
/* The following function will initiate and fire mouse events (event.initMouseEvent), for each touch events type we'll fire the equivalent mouse event : | |
*/ | |
Touchstart => Mousedown | |
Touchend => Mouseup |
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
# usage <scriptname> <directory below to look in> | |
find $1 -depth 2 -type d -name .git -execdir git log -1 --format=%cd" `pwd`" \; |
NewerOlder