Skip to content

Instantly share code, notes, and snippets.

‏‏‎ Eating github stars for breakfast.

Andrzej Rehmann hoto

‏‏‎ Eating github stars for breakfast.
Block or report user

Report or block hoto

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am hoto on github.
  • I am andrzejrehmann ( on keybase.
  • I have a public key whose fingerprint is A2D1 E8EE E63B 0BA9 B711 8FA2 2018 D6C1 C652 B490

To claim this, I am signing this object:

View decrypt-jenkins-credentials.groovy
passwd = hudson.util.Secret.decrypt(hashed_pw)
#Retrieving Security Credentials from Instance Metadata

Local port forwarding through a bastion machine:

One line version:

ssh -i ~/.ssh/bastion-key.pem -N -L

Or run with -v to debug:

ssh -v -i ~/.ssh/bastion-key.pem -N -L

View Jenkinsfile-basic.groovy
pipeline {
agent any
stages {
stage('Stage 1') {
steps {
script {
echo 'Stage 1'
hoto /
Created Aug 10, 2017 — forked from hrwgc/
bash wget - check if file exists at url before downloading
# simple function to check http response code before downloading a remote file
# example usage:
# if `validate_url $url >/dev/null`; then dosomething; else echo "does not exist"; fi
function validate_url(){
if [[ `wget -S --spider $1 2>&1 | grep 'HTTP/1.1 200 OK'` ]]; then echo "true"; fi
# Be root.
cd /dev
su - # Or “sudo -s”.
# Make sure that the device is not mounted.
umount sdb*
# source:
# Format the device for encryption.
aws iam list-roles --profile sandbox --query "Roles[?RoleName == 'ABC']"
# Setup IPs for two laptops
PC1 (master0
IP -
gw -
PC2 (slave - live cd)
IP -
gw -
# cgdisk is graphical
sudo cgdisk /dev/sda
sgdisk -o /dev/sda
sgdisk -n 1::+256MiB -u 1:fbf5660e-0474-4361-8b8f-22d8049e6920 -t 1:EF00 /dev/sda
sgdisk -n 2::+1024MiB -u 2:05ee6a32-f7ca-4379-9ac9-80cf6c63933b -t 2:8300 /dev/sda
sgdisk -n 3::+20480MiB -u 3:c522f8fe-01ee-433d-8642-e0c897e817aa -t 3:8304 /dev/sda
sgdisk -n 4::-9MiB -u 4:a086c08d-49f8-48ba-918d-e38d912d734b -t 3:BF01 /dev/sda
sgdisk -n 9::+8MiB -u 9:c3935f60-0315-427c-ac5b-db1808a72112 -t 3:BF07 /dev/sda
dd if=/dev/urandom of=/dev/sda3 bs=1MiB count=10
You can’t perform that action at this time.