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
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 August 5, 2024 18:21
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
@eznix86
eznix86 / vpn.md
Created February 5, 2022 17:57 — forked from joepie91/vpn.md
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@eznix86
eznix86 / optimization-images-fastapi.py
Created November 21, 2021 15:26 — forked from nelsondev19/optimization-images-fastapi.py
Optimization of images with FastAPI (Python)
from fastapi import FastAPI, UploadFile, File, BackgroundTasks
from fastapi.responses import JSONResponse
from os import getcwd
from PIL import Image
app = FastAPI()
PATH_FILES = getcwd() + "/"
@eznix86
eznix86 / README.md
Created May 10, 2021 08:31 — forked from franciscocpg/README.md
Import mitm certificate to CA in arch linux
  1. After installing mitmproxy run it (just type mitmproxy) in a terminal session and quit. This will create the necessaries certificates files at ~/.mitmproxy.

  2. Extract the certificate to .crt format:
    openssl x509 -in ~/.mitmproxy/mitmproxy-ca.pem -inform PEM -out ca.crt

  3. Trust the certificate into CA:
    sudo trust anchor ca.crt

  4. Run the mitmproxy again

Livestreaming via PS4 / Xbox to a local RTMP server

Live stream from your PS4 / Xbox to a local computer running an RTMP server by intercepting the twitch.tv stream.

Requirements

  • DD-WRT enabled Router (or router with iptables compatibility)
  • nix Envirment
  • nginx with the nginx-rtmp-module
@eznix86
eznix86 / docker-compose.yml
Created May 30, 2020 13:37 — forked from Mau5Machine/docker-compose.yml
Traefik Configuration and Setup
version: "3.3"
services:
################################################
#### Traefik Proxy Setup #####
###############################################
traefik:
image: traefik:v2.0
restart: always