Skip to content

Instantly share code, notes, and snippets.

View reneluria's full-sized avatar

Rene Luria reneluria

  • Infomaniak Network SA
  • Geneva, CH
  • X @herel
View GitHub Profile
@reneluria
reneluria / generate-qrcode.py
Last active July 25, 2023 12:37
Generate qrcode with optional logo
#!/usr/bin/env python3
import qrcode
import typer
from typing_extensions import Annotated, Optional
from rich import print
app = typer.Typer()
default_data = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
@reneluria
reneluria / links.json
Last active November 25, 2022 09:40
Parse traceroute.org and return json with links by country
@reneluria
reneluria / kubectl-failed
Created May 10, 2022 07:57
kubectl plugin to list failed pods
#!/bin/bash
usage() {
echo "Usage: $0 [-A|-n <namespace>]"
echo " -A : act on all namespaces"
echo " -n <namespace>: pods for namespace <namespace>"
}
all=0
namespace=
@reneluria
reneluria / minimum-input-volume.scpt
Created January 19, 2022 10:22
applescript to set minimum input volume
property min_volume : 30
repeat
try
set volumeDialog to display dialog "Minimum volume" default answer 30
on error number -128
-- user canceled
return
end try
@reneluria
reneluria / fix-input-volume.sh
Last active January 19, 2022 08:17
Ensure input volume is always above a certain level
#!/bin/bash
# fix-input-volume.sh - Ensure input volume is always above a certain level
# Copyright (C) 2022 Rene Luria <rene@luria.ch>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#!/usr/bin/env python3
"""
safe-drain - drains a node safely by issuing rollout restart on single pod deployments
Copyright (C) 2022 rene.luria@infomaniak.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Keybase proof

I hereby claim:

  • I am reneluria on github.
  • I am herel (https://keybase.io/herel) on keybase.
  • I have a public key ASBWyCmsRf37FYMAK_ozthVjv3APchQNEKohZ24McU8FsAo

To claim this, I am signing this object:

@reneluria
reneluria / inf-install-wp-cli.sh
Last active August 29, 2015 14:25 — forked from ajaegers/inf-install-wp-cli.sh
One command to install WP-CLI on hosting using alias (if you cannot move wp-cli.phar in PATH)
#!/bin/bash
# initialy https://gist.github.com/ajaegers/d4c5286e52581821cb43
PATH=/opt/php/bin:/usr/bin:/bin
URL="https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar"
NAME="wp-cli.phar"
cd