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
macmini-crcqe-2:~ crcqe$ cat ~/.ssh/known_hosts | |
macmini-crcqe-2:~ crcqe$ ssh -i ~/.crc/machines/crc/id_ecdsa [email protected] -p 2222 | |
The authenticity of host '[127.0.0.1]:2222 ([127.0.0.1]:2222)' can't be established. | |
ED25519 key fingerprint is SHA256:jfbXiEwqxZcVKLW/biuNolLr80NfNuJuOdr3jmI9Xl4. | |
This key is not known by any other names | |
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes | |
Warning: Permanently added '[127.0.0.1]:2222' (ED25519) to the list of known hosts. | |
Fedora CoreOS 37.20221225.3.0 | |
Activate the web console with: systemctl enable --now cockpit.socket |
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
To get the v for a module from a different repo on a specific commit: | |
go get github.com/adrianriobo/pulumi-command@4007017bb359927f8474c223a753d6f2d4be79e2 | |
This will add the required dependency on go.mod: | |
require ( | |
github.com/adrianriobo/pulumi-command v0.0.0-20221223131545-4007017bb359 // indirect | |
... | |
) | |
Then use replace with the value: |
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
# Check state | |
sudo subscription-manager status | |
# Check subscriptions | |
sudo subscription-manager list --consumed | |
# Check product | |
sudo subscription-manager list | |
# Register |
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
git remote add upstream https://github.com/USER/repository.git | |
git checkout -b BRANCHNAME | |
git pull upstream pull/ID/head:BRANCHNAME | |
git checkout BRANCHNAME |
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/env bash | |
# Generate JWT for Github App | |
# | |
# Inspired by implementation by Will Haley at: | |
# http://willhaley.com/blog/generate-jwt-with-bash/ | |
# From: | |
# https://stackoverflow.com/questions/46657001/how-do-you-create-an-rs256-jwt-assertion-with-bash-shell-scripting | |
thisdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
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 | |
# Author: Param Aggarwal | |
# Multipart parallel downloader in Shell using cURL | |
if [[ $# -lt 1 ]]; then | |
echo "$0: Pass URL to download as argument" | |
exit 1 | |
fi | |
url=$1 |
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
# Create token | |
curl 'https://${JENKINS_URL}/me/descriptorByName/jenkins.security.ApiTokenProperty/generateNewToken' \ | |
--data 'newTokenName=${TOKEN_NAME}' | |
--user ${USERNAME}:${PASSWORD} | |
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
# Download Openssh https://github.com/PowerShell/Win32-OpenSSH/wiki/Install-Win32-OpenSSH | |
# Start-Service sshd | |
# OPTIONAL but recommended: | |
Set-Service -Name sshd -StartupType 'Automatic' | |
# In our case due the limitations on logon accounts for services on windows we need to create a bat file to start | |
# the service on startup | |
# Create firewall rule | |
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 |
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
# Get ID | |
gpg --auto-key-locate keyserver --locate-keys [email protected] | |
# Export | |
gpg -ao mypub.key --export <MY_KEY_ID> | |
gpg -ao myprivate.key --export-secret-keys <MY_KEY_ID> | |
# Import | |
gpg --import myprivate.key | |
gpg --import mypub.key |
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
# Check largest files | |
sudo du -a /dir/ | sort -n -r | head -n 20 |
NewerOlder