Skip to content

Instantly share code, notes, and snippets.

View eznix86's full-sized avatar
🎯
Focusing

Bruno Bernard eznix86

🎯
Focusing
View GitHub Profile
@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 / .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
@eznix86
eznix86 / api.php
Created May 28, 2020 18:30 — forked from DevPGSV/api.php
Plugin System in php
<?php
class Api {
public function call($o) {
echo $o."<br>\n";
}
}
@eznix86
eznix86 / fork-a-branch.sh
Created March 26, 2020 06:08 — forked from benbalter/fork-a-branch.sh
How to fork a single branch of a repo, preserving commit log
mkdir target-repo
cd target-repo
git init
git remote add origin [email protected]...
git remote add upstream [email protected]....
git fetch upstream
git pull upstream master
git push origin master
Alternative:
@eznix86
eznix86 / phpstorm-cs-fixer.md
Created December 24, 2019 13:10 — forked from nienkedekker/phpstorm-cs-fixer.md
Set up PHP-CS-Fixer in PHPStorm

Use PHP-CS-Fixer in PHPStorm

  • Install PHP-CS-Fixer on your local machine according to these instructions: https://github.com/FriendsOfPHP/PHP-CS-Fixer
  • Open PHPStorm, Preferences > Tools > External Tools and enter these values: img
  • Program, edit to match your path where PHP-CS-Fixer lives: /.composer/vendor/friendsofphp/php-cs-fixer/php-cs-fixer
  • Parameters: --rules=@PSR2 --verbose fix $FileDir$/$FileName$. Note that previous verions of PHP-CS-Fixer used --levels instead of --rules.
  • Working directory: $ProjectFileDir$

Click OK and Apply. Now we'll set up a shortcut.

  • Go to Preferences > Keymap and search for "PHP Fixer" (or whatever name you gave it). Add whatever shortcut you like, I'm using ctrl + cmd + ]: