Skip to content

Instantly share code, notes, and snippets.

View aslafy-z's full-sized avatar

Zadkiel AHARONIAN aslafy-z

View GitHub Profile
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
Created April 12, 2024 15:21
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 / docker-compose-systemd-unit.md
Last active February 23, 2024 15:59 — forked from mosquito/README.md
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service

[Unit]
Description=%i service with docker compose
# Requires=docker.service
# After=docker.service
@aslafy-z
aslafy-z / serveo-tunnel@.service
Last active February 16, 2024 15:03 — forked from guettli/ssh-tunnel@.service
Reliable persistent SSH-Tunnel via systemd (not autossh)
# Reliable persistent SSH-Tunnel via systemd (not autossh)
# https://gist.github.com/aslafy-z/24e2ddb02fa269444620eab1bcfe2932#file-serveo-tunnel-service
#
# Usage: systemctl start serveo-tunnel@[tunnel-string] (see https://serveo.net for details)
# systemctl start serveo-tunnel@mytunnel:80:localhost:8080
# systemctl enable serveo-tunnel@mytunnel:80:localhost:8080 (to make it persist reboot)
[Unit]
Description=Serveo tunnel for %i
After=network.target
@aslafy-z
aslafy-z / play-aoe2-online.md
Last active February 13, 2024 17:50
How to setup Age Of Empires 2 to play online
  • Install Age Of Empires 2 The Conquerors Expansion
  • Patch game with userpatch: http://userpatch.aiscripters.net
  • Install and launch Hamachi: https://www.vpn.net
  • Create or join a Hamachi network
  • SERVER: Install ForceBindIP: https://r1ch.net/projects/forcebindip
  • SERVER: Create shortcut like: "C:\Program Files (x86)\ForceBindIP\ForceBindIP.exe" XX.XX.XX.XX "C:\Program Files (x86)\Age Of Empires 2 & The Conquerors Expansion - Full Game\Age2_x1\age2_x1.exe"

    Where XX.XX.XX.XX is your Hamachi IP

  • Start game, select MultiPlayer and TCP/IP DirectPlay method.
  • SERVER: Create a game and give your Hamachi IP to other players
  • CLIENT: Click on Show games and enter Hamachi IP of the server
@aslafy-z
aslafy-z / Jenkinsfile
Last active December 13, 2023 19:52 — forked from rufoa/Jenkinsfile
Jenkins [skip ci] implementation for multi-branch declarative pipeline
pipeline {
...
stages {
stage('Run CI?') {
steps {
script {
if (sh(script: "git log -1 --pretty=%B | grep -F -ie '[skip ci]' -e '[ci skip]'", returnStatus: true) == 0) {
currentBuild.result = 'NOT_BUILT'
error 'Aborting because commit message contains [skip ci]'
@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
@aslafy-z
aslafy-z / _huawei-sms-forwarder.md
Last active November 1, 2023 22:59
Forward SMS from Huawei LTE router to another number

Forward SMS from Huawei LTE router to another number

Dependencies

Usage

export HUAWEI_ROUTER_IP_ADDRESS="" # Router IP address