Skip to content

Instantly share code, notes, and snippets.

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

Beshoy Girgis egyptianbman

🏠
Working from home
View GitHub Profile
@ericbisme
ericbisme / gist:8bb09be3537d669d6ef34e784c90ad22
Created August 8, 2021 20:17
k3s/k3os Remove Master Node from embedded ETCD
https://github.com/k3s-io/k3s/issues/2732#issuecomment-749181797
Run pod with etcdctl:
kubectl run --rm --tty --stdin --image docker.io/bitnami/etcd:latest etcdctl --overrides='{"apiVersion":"v1","kind":"Pod","spec":{"hostNetwork":true,"restartPolicy":"Never","securityContext":{"runAsUser":0,"runAsGroup":0},"containers":[{"command":["/bin/bash"],"image":"docker.io/bitnami/etcd:latest","name":"etcdctl","stdin":true,"stdinOnce":true,"tty":true,"volumeMounts":[{"mountPath":"/var/lib/rancher","name":"var-lib-rancher"}]}],"volumes":[{"name":"var-lib-rancher","hostPath":{"path":"/var/lib/rancher","type":"Directory"}}]}}'
Remove member (must use hex ID):
./bin/etcdctl --key /var/lib/rancher/k3s/server/tls/etcd/client.key --cert /var/lib/rancher/k3s/server/tls/etcd/client.crt --cacert /var/lib/rancher/k3s/server/tls/etcd/server-ca.crt member remove 327051268c526155
List Members:

Setup Canon LBP-6030B on ArchLinux

  1. Install $ sudo pacman -S ghostscript
  2. Install $ yay -S cups
  3. Enable its service $ sudo systemctl enable cups.service
  4. Restart the service $ sudo systemctl restart cups.service
  5. Check its status $ sudo systemctl status cups.service
  6. Install $ yay -S cnrdrvcups-sfp
  7. BE AWARE THAT LBP-6030B is a UFRII-LT printer with sfp. Only use cnrdrvcups-lb package if your printer is LBP6030 (white version, USA)!!
  8. Open http://localhost:631/ in Chrome.
  9. Go to Administration and then click on Add Printer
@KingCprey
KingCprey / fivem_keys.lua
Last active January 10, 2025 11:48
FiveM IsControlPressed keys
--IsControlPressed(0,x)
local keys={}
keys[34]="A"
keys[29]="B"
keys[26]="C"
keys[30]="D"
keys[46]="E"
keys[49]="F"
keys[47]="G"
keys[74]="H"
@magnetikonline
magnetikonline / README.md
Last active April 23, 2025 12:33
Setting Nginx FastCGI response buffer sizes.
@ddellspe
ddellspe / times.py
Last active December 20, 2015 14:39
Python code for anomaly decoding Fixed to align with proper rules (and expanded)
import os
import sys
import datetime
import md5
def otpdecrypt(string, key):
if len(string) != len(key):
print "invalid"
return "invalid"
message = ""
# Raw transaction API example work-through
# Send coins to a 2-of-3 multisig, then spend them.
#
# For this example, I'm using these three keypairs (public/private)
# 0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86 / 5JaTXbAUmfPYZFRwrYaALK48fN6sFJp4rHqq2QSXs8ucfpE4yQU
# 04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec6874 / 5Jb7fCeh1Wtm4yBBg3q3XbT6B525i17kVhy3vMC9AqfR6FH2qGk
# 048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d46213 / 5JFjmGo5Fww9p8gvx48qBYDJNAzR9pmH5S389axMtDyPT8ddqmw
# First: combine the three keys into a multisig address:
./bitcoind createmultisig 2 '["0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86","04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a9