Skip to content

Instantly share code, notes, and snippets.

View nebril's full-sized avatar
🏠
Working from home

Maciej Kwiek nebril

🏠
Working from home
View GitHub Profile
@nebril
nebril / sbr.sh
Created August 19, 2024 13:05
ddcutil set brightness
#!/usr/bin/sh
if [ -z "$1" ]
then
echo "Brightness not supplied"
fi
for monitor in $(sudo ddcutil detect | grep i2c | awk '{print $3}' | grep -o '[0-9]$') ; do sudo ddcutil setvcp 10 --bus "$monitor" "$1"; done
@nebril
nebril / style.css
Created February 22, 2023 15:52
CSS to make github checks not scrollable
.merge-status-list {
max-height: none !important
}
# docker-build-agent:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v1
# - name: Build and push agent image
# uses: docker/build-push-action@v1
# with:
# username: ${{ secrets.DOCKER_HUB_USERNAME }}
# password: ${{ secrets.DOCKER_HUB_PASSWORD }}
@nebril
nebril / find_leaked.py
Created April 14, 2020 17:48
Get leaked clusters
#You need to be logged in to your google sdk account and have gcloud set to cilium-ci project
import re
import subprocess
import json
import requests
from bs4 import BeautifulSoup
@nebril
nebril / delete.sh
Created February 20, 2020 19:23
Delete all terminating namespaces in k8s cluster
kubectl get ns | grep Terminating | awk '{print $1}' | xargs -n 1 bash -c 'kubectl get ns -o json $1 | tr -d "\n" | sed "s/\"finalizers\": \[[^]]\+\]/\"finalizers\": []/" | kubectl replace --raw /api/v1/namespaces/$1/finalize -f -' -
@nebril
nebril / main.go
Created July 18, 2019 22:38
Golang print struct funcs
package main
import (
"fmt"
"reflect"
"strings"
"github.com/cilium/cilium/test/helpers"
)
@nebril
nebril / pipe.go
Created April 20, 2018 13:26
Golang broken pipe message
package main
import (
"fmt"
"net"
"os"
"syscall"
"time"
)
:%!python -m json.tool
@nebril
nebril / goathpher.svg
Created May 17, 2016 11:12
goat-pher
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nebril
nebril / run_on_my_env.sh
Created August 3, 2015 12:40
run commands on my dos.py env
#!/bin/sh
set -x
dos.py list | grep mkwiek | xargs -i "$@" {}