Skip to content

Instantly share code, notes, and snippets.

View Zorono's full-sized avatar
😌
I may be slow to respond.

John Magdy Lotfy Kamel Zorono

😌
I may be slow to respond.
View GitHub Profile
@Zorono
Zorono / ysi_less.md
Created June 3, 2025 13:42 — forked from TommyB123/ysi_less.md
ysi_less (how to remove YSI from your gamemode and embrace PawnPlus)

Let's Remove YSI

In this very opinionated write-up, we'll go over alternative libraries and plugins that can be used to replace some functionality found in YSI.

Starting

YSI is a set of libraries for SA-MP/open.mp servers that are admittedly useful, but often criticized for their bloated, complicated nature and occasional questionable actions by its main developer. (Sneaking in malicious code to hinder the experience of unassuming SA-MP Android users)

Over the years, people have expressed displeasure when using these libraries since they are over-engineered and can often cause issues that are confusing for less experienced pawn scripters. We'll go over some alternative libraries that are more plug-and-play, are way less hacky and can be used to produce cleaner code. (in my opinion)

PawnPlus

A lot of the libraries and snippets I'll be sending depend on the PawnPlus plugin. PawnPlus is a very neat plugin that greatly expands the potential of pawn scripting in SA

@Zorono
Zorono / Checking your Raspberry Pi's view of its power supply.md
Created April 23, 2025 05:33 — forked from Paraphraser/Checking your Raspberry Pi's view of its power supply.md
Checking your Raspberry Pi's view of its power supply (sometimes it's not the wall-wart)

Checking your Raspberry Pi's view of its power supply

Sometimes it seems like the first (and sometimes only) advice you get offered for almost any problem with a Raspberry Pi is "check your power supply". You think something like:

"hey, I'm using an official power supply sold as being matched with my Pi so how can there be any problem?"

You look up the specs then stick a controlled load across your supply and confirm that it can deliver the required number of Watts.

Yet your problems persist…

@Zorono
Zorono / Makefile
Created September 23, 2024 16:29 — forked from alwynallan/Makefile
Hardware PWM Controller for the Raspberry Pi 4 Case Fan
CC = gcc
RM = rm -f
INSTRUMENT_FOR_PROMETHEUS := false
ifeq ($(INSTRUMENT_FOR_PROMETHEUS),true)
CFLAGS = -Wall -DINSTRUMENT_FOR_PROMETHEUS
LIBS = -lbcm2835 -lprom -lpromhttp -lmicrohttpd
else
CFLAGS = -Wall
@Zorono
Zorono / cap.sh
Created November 16, 2023 19:46 — forked from patillacode/cap.sh
#!/bin/bash
################################################################################
# cap - capture your screen
#
# This script allows you to capture your screen on Linux or macOS systems using
# the appropriate tools available on each platform. On Linux, it uses 'slop'
# and 'ffmpeg', while on macOS, it utilizes 'screencapture'. The script prompts
# you to select a desktop area for recording and saves the recording as an MP4/MOV
# file with customizable video quality.
@Zorono
Zorono / access.lua
Created November 5, 2023 07:16 — forked from mariocesar/access.lua
Nginx Lua script redis based for Basic user authentication
function password_encode(password)
local bcrypt = require 'bcrypt'
return bcrypt.digest(password, 12)
end
function check_password(password, encoded_password)
local bcrypt = require 'bcrypt'
return bcrypt.verify(password, encoded_password)
end
@Zorono
Zorono / 01.md
Created November 5, 2023 03:45 — forked from mtigas/01.md
HTTPS / SSL certificate config stuff

Normal SSL cert

export DATE=`date +"%Y%m"`
export SITENAME="mike_tig_as"
export KEYNAME="$DATE-$SITENAME"

# Generate private key, make it have no password.
# change to 2048 if you want compatibility with CDNs / aws cloudfront / load balancers, etc
openssl genrsa -aes256 -passout pass:xxxx -out "${KEYNAME}.pass.key" 4096
openssl rsa -passin pass:xxxx -in ${KEYNAME}.pass.key -out ${KEYNAME}.key
@Zorono
Zorono / nginx-config-auth-cert-ssl.md
Created November 5, 2023 03:40 — forked from alexishida/nginx-config-auth-cert-ssl.md
Tutorial to configure Nginx client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Original: https://gist.github.com/mtigas/952344

Convert SSL certificate from CRT format to PEM

openssl x509 -in server.crt -out server.der -outform DER
openssl x509 -in server.der -inform DER -out server.pem -outform PEM
@Zorono
Zorono / gist:6c6f6ba40ec35194dd0f9366d12524b5
Created November 5, 2023 03:39 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes:

@Zorono
Zorono / curl_example.cpp
Created January 15, 2023 23:08 — forked from alghanmi/curl_example.cpp
cURL C++ Example
#include <iostream>
#include <string>
#include <curl/curl.h>
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp)
{
((std::string*)userp)->append((char*)contents, size * nmemb);
return size * nmemb;
}
@Zorono
Zorono / ubuntu-hardening.md
Created December 3, 2022 17:21
List of things for hardening Ubuntu

System Updates

http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/

Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get autoclean