Skip to content

Instantly share code, notes, and snippets.

@sandys
sandys / hardware_token.md
Last active May 19, 2020 14:14
Registering a hardware token
@jaytaylor
jaytaylor / delete-from-v2-docker-registry.md
Last active February 11, 2025 15:28
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
@dideler
dideler / bot.rb
Last active March 26, 2025 18:13
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
@alexellis
alexellis / openfaas-cloud-vnext.md
Last active March 2, 2020 19:44
OpenFaaS Cloud vNext - User secrets on Kubernetes

OpenFaaS Cloud - Encrypted user secrets for Kubernetes

This Gist shows you how to make use of SealedSecrets in OpenFaaS Cloud. Your secrets can be encrypted with the public key of OpenFaaS Cloud meaning you can commit them to your public or private Git repo. Once deployed the cluster will decrypt them and attach them to your function(s).

  1. Before starting you must install the kubeseal binary using the OpenFaaS Cloud CLI extensions:

CLI documentation self-hosted configuration

Here is an example repo which is working end-to-end: https://github.com/alexellis/my-fn

@doaa-altarawy
doaa-altarawy / .codecov.yml
Last active March 19, 2024 08:00
Codecov yml configuration example
# For more configuration details:
# https://docs.codecov.io/docs/codecov-yaml
# Check if this file is valid by running in bash:
# curl -X POST --data-binary @.codecov.yml https://codecov.io/validate
# Coverage configuration
# ----------------------
coverage:
status:
@rumansaleem
rumansaleem / clean-up-arch-linux.md
Created May 28, 2019 08:51
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active April 9, 2025 09:37
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.