Skip to content

Instantly share code, notes, and snippets.

View eznix86's full-sized avatar
🎯
Focusing

Bruno Bernard eznix86

🎯
Focusing
View GitHub Profile
#!/bin/bash
set -e
if [[ $EUID -ne 0 ]]; then
echo "[ERROR] This script must be run as root (use sudo)." >&2
exit 1
fi
SUBNET="192.168.42."
# #############################
# To run as root, also don't forget to do ssh-copy-id to the milkv
# ###############################
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "[ERROR] This script must be run as root (use sudo)." >&2
exit 1
fi
####################
#
# Author: Bruno Bernard (eznix86)
#
####################
# Note on how to merge all kubeconfig into one place
# Your default configuration will be fetched by kubectl is inside of ~/.kube/config
# Gather all of them, it should be paths colon (:) seperated without spaces
export KUBECONFIG=~/.kube/config:~/documents/configs-a.txt:~/documents/configs-b.txt:~/kubeconfigs/aws/config
@eznix86
eznix86 / BiometricLogin.md
Created March 3, 2025 08:15 — forked from alan-delgado/BiometricLogin.md
Biometric Login Implementation

Biometric Login implementation

Biometric login allows you to use FaceID and TouchID (iOS) or the Biometric Prompt (Android) to authenticate the user with a face or fingerprint scan.

This guide is intended for React Native projects using Expo.

Instructions

  1. Install expo LocalAuthentication to be able to authenticate users using biometrics
@eznix86
eznix86 / unfollow.js
Last active January 7, 2025 17:29 — forked from darraghoriordan/unfollow.js
Unfollow everyone on twitter.com who doesn't follow you
// Unfollow everyone on twitter who doesn't follow you.
// based on:
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)
// https://gist.github.com/JamieMason/7580315
//
// 1. Go to https://twitter.com/YOUR_USER_NAME/following
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac)
// 3. Paste this into the Developer Console and run it
//
#!/bin/bash
export VITO_VERSION="1.x"
export DEBIAN_FRONTEND=noninteractive
export V_PHP_VERSION="8.2"
# Check if running as root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
@eznix86
eznix86 / alpine-remove-desktop.sh
Last active March 23, 2025 14:52
This is the inverse of setup-desktop in Alpine Linux
# copy and paste to /sbin/remove-desktop
#!/bin/sh
PREFIX=
: ${LIBDIR=$PREFIX/lib}
. "$LIBDIR/libalpine.sh"
usage() {
cat <<-__EOF__
@eznix86
eznix86 / filter.ts
Created December 8, 2023 14:06 — forked from cmdruid/filter.ts
Nostr Event Filter Example
/** Basic implementation of NIP 01 filters in typescript. */
interface Event {
id : string
kind : number
created_at : number
pubkey : string
subject ?: string
content : string
sig : string
@eznix86
eznix86 / Vagrantfile
Created November 29, 2023 13:08
Vagrant VMs with different subnet
Vagrant.configure("2") do |config|
vms_in_network1 = 2
vms_in_network2 = 3
(1..vms_in_network1).each do |i|
config.vm.define "vm#{i}" do |vm|
vm.vm.box = "ubuntu/noble64"
vm.vm.network "private_network", ip: "192.168.33.#{i + 9}" # 192.168.33.xxx
end
@eznix86
eznix86 / .gitlab-ci.yml
Created February 14, 2022 18:00 — forked from LouManglass/.gitlab-ci.yml
Sample Gitlab CI job configuration to run tests on merge requests
default:
image: node:15
run-tests:
script:
- npm install @useoptic/cli # or add as a development dependency in your package manager
- npx api run run-diff-tests --exit-on-diff
only:
- merge_requests