Skip to content

Instantly share code, notes, and snippets.

View aslafy-z's full-sized avatar

Zadkiel AHARONIAN aslafy-z

View GitHub Profile
@aslafy-z
aslafy-z / livetv.m3u
Last active August 13, 2024 16:56
Sample Live TV M3U
#EXTM3U
#EXTINF:-1 tvg-id="20MinutesTV.fr" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/20_Minutes_TV_IDF_logo_%282023%29.png/320px-20_Minutes_TV_IDF_logo_%282023%29.png" group-title="General",20 Minutes TV
https://lives.digiteka.com/stream/86d3e867-a272-496b-8412-f59aa0104771/index.m3u8
#EXTINF:-1 tvg-id="TVTarn.fr" tvg-logo="https://i.imgur.com/MJdY1m3.png" group-title="General",TV Tarn
https://live.creacast.com/albi-tv-ch1/stream/playlist.m3u8
#EXTINF:-1 tvg-id="BFMBusiness.fr" tvg-logo="https://i.imgur.com/psqIHn4.png" group-title="Business;News" user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36",BFM Business
#EXTVLCOPT:http-user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
https://ncdn-live-bfm.pfd.sfr.net/shls/LIVE$BFM_BUSINESS/index.m3u8?end=END&start=LIVE
#EXTINF:-1 tvg-id="BFMTV.fr" tvg-logo="https://i.imgur.com/YJCcczD.png" group-title="News" user-agen
@aslafy-z
aslafy-z / jellyfin-init.sh
Created August 7, 2024 15:55
Init jellyfin programatically
#!/bin/sh
set -x
jellyfin_server="http://localhost:8096"
username="jellyfin"
password="jellyfin"
storage_path="/home/library"
log_file="/tmp/jellyfin-init.log"
#!/bin/sh
git_endpoint=https://
git_branch=main
git_username=foo
git_password=bar
if [ -n "$git_username" ] && [ -n "$git_password" ] && echo "$git_endpoint" | grep -qE '^https?://'; then
encoded_git_username=$(echo "$git_username" | yq @uri)
encoded_git_password=$(echo "$git_password" | yq @uri)

Dex: encode Oauth2Client CRD name

Source dexidp/dex#1606 (comment)

Dex OAuth2Client CRD metadata.name field should match spec.id and spec.name but needs a special encoding.

Generate it with:

wget https://gist.github.com/aslafy-z/c7e6cc1e2efb15b33fe497e4adbbf6f5/raw/dex-encode-crd-name.go
@aslafy-z
aslafy-z / kustomization.yaml
Created June 19, 2024 15:09
online-boutique
kind: Kustomization
namespace: online-boutique
resources:
- https://github.com/GoogleCloudPlatform/microservices-demo//kustomize/base?ref=6af73dcf7fe1ca653d95ae7a29e12faf8cf02964
components:
- https://github.com/GoogleCloudPlatform/microservices-demo//kustomize/components/non-public-frontend?ref=6af73dcf7fe1ca653d95ae7a29e12faf8cf02964
- https://github.com/GoogleCloudPlatform/microservices-demo//kustomize/components/without-loadgenerator?ref=6af73dcf7fe1ca653d95ae7a29e12faf8cf02964
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
@aslafy-z
aslafy-z / descheduler-grafana-dashboard.json
Last active September 10, 2024 07:42
Very rough Kubernetes descheduler Grafana dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
{
"streams": [
{
"stream": {
"container": "controller",
"container_id": "cec7f4ad43cf5d883a04d6a612e65fb6429ea671b7757ef0643b74a20511a666",
"fluentd_host": "logging-operator-logging-fluentd-1",
"host": "ci01-a3np-ingress-wan-a-vmss000000",
"namespace": "nginx-ingress-wan",
"pod": "nginx-ingress-wan-controller-86656594b5-bd7qb",
@aslafy-z
aslafy-z / -repro-kyverno-random-test-results-v1.9-v1.10.md
Last active November 22, 2023 20:32
Repro for Kyverno random test results on v1.9-v1.10

Reproduction for Kyverno random test results on v1.9-v1.10

git clone https://gist.github.com/aslafy-z/4be51cb23e7a40ee5e288ab2ad85f1a6
cd 4be51cb23e7a40ee5e288ab2ad85f1a6
sh run.sh
@aslafy-z
aslafy-z / autokey-netskope-login.py
Last active November 20, 2023 18:12
AutoKey script to relogin with Netskope client
# Displays the information of the next window to be left-clicked
import time
import datetime
nsClientWindowName = "Netskope Client"
username = ""
password = ""
def window_wait_loose_focus(title, timeOut=0):
waited = 0