Skip to content

Instantly share code, notes, and snippets.

View AliLogic's full-sized avatar
🖥️
improvisation

Ali AliLogic

🖥️
improvisation
  • Karachi, Pakistan
View GitHub Profile
@AliLogic
AliLogic / main.go
Created May 14, 2021 10:51
Gets the closest game vehicle color ID from hex (made for UGMP)
// Credits to https://github.com/lucasb-eyer/go-colorful for the RGB color distance functions
// Credits to https://gist.github.com/CraigChilds94/6514edbc6a2db5e434a245487c525c75 for the Text to Hex conversion
package main
import (
"bufio"
"fmt"
"math"
"os"
@AliLogic
AliLogic / settings.json
Created April 14, 2021 08:17
Windows Terminal's Settings JSON File Backup
// This file was initially generated by Windows Terminal (Unpackaged) 1.3.200921001-release1.3
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@AliLogic
AliLogic / Dockerfile
Last active January 23, 2021 17:50
A docker file for building and running SA-MP server with sampctl
FROM ubuntu:xenial
##
# Add 32-bit architecture
##
RUN \
dpkg --add-architecture i386
##
@AliLogic
AliLogic / ugmp-enb-fix.bat
Last active January 21, 2021 13:11
A simple batch script that I wrote for using ENB with UGMP.
:: Last Edited On: 17:55 GMT + 5 21st January 2020
:: Made the script more robust to require zero changes
@echo OFF
echo Running the script from the directory '%CD%'...
echo.
:: Check if the 'fix' folder exists or not
IF NOT EXIST "%CD%\fix\" (
:: Create the fix folder first
@AliLogic
AliLogic / ipbans.lua
Last active November 24, 2019 15:02
Formerly hard bans, IP bans is a IP range based system that completely stops the client from connecting to the server. This is tested and works, you will need to setup a database table for it however.
-- START OF THE FILE
--
-- Developed by 28days (AliLogic)
-- for Roleplay Studios (RPS)
-- 2019 (c)
--
AddEvent("OnClientConnectionRequest", function(ip, port)
local string = ip