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 May 6, 2025 17:49
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 June 30, 2025 10:51
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.md
Last active July 10, 2025 09:05
Fix DNS resolution in WSL2

Permanent WSL DNS Fix (WSL 2.2.1+)

If you're encountering ping github.com failing inside WSL with a Temporary failure in name resolution, you're not alone — this has been a long-standing issue, especially when using VPNs or corporate networks.

This issue is now fixed robustly with DNS tunneling, which preserves dynamic DNS behavior and avoids limitations like WSL’s former hard cap of 3 DNS servers in /etc/resolv.conf.

DNS tunneling is enabled by default in WSL version 2.2.1 and later, meaning that if you're still seeing DNS resolution issues, the first and most effective fix is simply to upgrade WSL. Upgrading WSL updates the WSL platform itself, but does not affect your installed Linux distributions, apps, or files.

To upgrade WSL, follow these steps,