This file contains hidden or 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
FROM cgr.dev/chainguard/wolfi-base | |
RUN apk update && apk add --no-cache --update-cache curl jq | |
CMD curl -s https://api.adviceslip.com/advice --http1.1 | jq .slip.advice |
This file contains hidden or 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 -eu | |
# Helpful script to summarize the commits and files changes between two git SHAs or branches or tags using the github API and updating a wolfi version update pull request with the summary. | |
# This is very specific to wolfi version update PRs. | |
# Usage: ./github-compare-summary-update-pr.sh <wolfi version update PR URL> | |
# Example: ./github-compare-summary-update-pr.sh "https://github.com/wolfi-dev/os/pull/26617" | |
base_url="https://api.github.com/repos/" | |
# get the repo as the first argument | |
version_bump_pull_request_url=$1 |
This file contains hidden or 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 -eu | |
# Helpful script to summarize the commits and files changes between two git SHAs or branches or tags using the github API | |
# Usage: ./github-compare-summary.sh <repo> <from_sha> <to_sha> | |
# Example: ./github-compare-summary.sh "awslabs/aws-c-http" "v0.8.7" "v0.8.8" | |
# Example: ./github-compare-summary.sh "awslabs/aws-c-http" "7db2452238caece2d3a91e6cbed75324edccea7d" "4e74ab1e3702763e0b87bd1752f5a37c2f0400ac" | |
# Example: ./github-compare-summary.sh "kubernetes-sigs/kubebuilder" "v4.1.1" "v4.2.0" | |
base_url="https://api.github.com/repos/" | |
# get the repo as the first argument | |
repo=$1 |
This file contains hidden or 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 | |
# Set the registry URL | |
registry_url="http://localhost:5005" | |
# List repositories | |
repositories=$(curl -s "${registry_url}/v2/_catalog" | jq -r '.repositories[]') | |
# List tags for each repository | |
for repo in ${repositories}; do |
This file contains hidden or 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 -eu | |
# Find all packages dependent on a given package across all wolfi package repositories | |
# Usage: ./find-wolfi-dependencies.sh <package_to_query> | |
# Example: ./find-wolfi-dependencies.sh "python3" | |
# package_to_query is the package name to query and is required | |
# If package_to_query is not provided, the script will exit with an error | |
package_to_query=${1:-} | |
if [ -z "${package_to_query}" ]; then | |
echo "Usage: ${0} <package_to_query>" |
This file contains hidden or 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 python3 | |
import faulthandler | |
import functools | |
import logging | |
import sys | |
import click | |
from debian import debian_support |
This file contains hidden or 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 -eu | |
LAUNCHPAD_USER="" | |
LAUNCHPAD_USER_STRING="" | |
GIT_HUB_USER="" | |
GIT_HUB_USER_STRING="" | |
SSH_KEY="" | |
SSH_KEY_STRING="" | |
CREATE_BACKDOOR_USER="false" | |
PLAIN_TEXT_PASSWORD="" |
This file contains hidden or 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 python | |
# -*- coding: utf-8 -*- | |
# | |
# This is how I used it: | |
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history | |
import sys | |
import time |
This file contains hidden or 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 SSH-config for nodes | |
vagrant ssh-config node0 > node0.ssh-config | |
vagrant ssh-config node1 > node1.ssh-config | |
# get teh SSH key path from the ssh-config | |
node0_ssh_key=$(ssh -F ./node0.ssh-config -G node0 | grep -m1 -oP "(?<=identityfile ).*") | |
echo ${node0_ssh_key} | |
node1_ssh_key=$(ssh -F ./node1.ssh-config -G node1 | grep -m1 -oP "(?<=identityfile ).*") | |
echo ${node1_ssh_key} |
This file contains hidden or 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 -eu | |
set -o pipefail | |
# Run a command and report status to https://healthchecks.io | |
usage() { | |
echo "Usage: $0 <healthchecks.io UUID> <command>" | |
exit 1 | |
} | |
trap usage EXIT |
NewerOlder