Skip to content

Instantly share code, notes, and snippets.

View VIRUXE's full-sized avatar

Flávio Pereira VIRUXE

View GitHub Profile
@VIRUXE
VIRUXE / dlSampcacAsi.bat
Last active July 9, 2024 19:20
Downloads the ASI file for SAMPCAC and adds an exclusion for it on Windows Defender
@echo off
SET "FILE_NAME=sampcac_client.asi"
echo Adding Exclusion to Windows Defender
powershell -Command "Add-MpPreference -ExclusionPath '%CD%\%FILE_NAME%'"
echo Downloading SAMPCAC ASI...
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://gta.flaviopereira.dev/sa/samp/asi/sampcac_client.asi', '%FILE_NAME%')"
echo Done.
@VIRUXE
VIRUXE / start.ps1
Last active June 30, 2024 16:37
FXServer Start Utility script
param([string]$ServerName)
function Test-Server($folder) { Test-Path "$folder/server.cfg" }
do {
if (-not $ServerName -or -not (Test-Server $ServerName)) {
Write-Host
$servers = Get-ChildItem -Directory | Where-Object { Test-Server $_.FullName }
@VIRUXE
VIRUXE / delete_node_modules.ps1
Created June 22, 2024 15:06
Deletes node_modules folders, recursively.
Param(
[Parameter(Mandatory)]
[string]$RootPath
)
if (-not $RootPath) { $RootPath = Read-Host "Enter the root path to search for 'node_modules' folders" }
function Remove-NodeModules($path) {
$success = $true
@VIRUXE
VIRUXE / sv-resources.ps1
Last active June 20, 2024 22:47
Fetch a comma-separated resource list from a FiveM server
try {
$serverCode = $args[0]
if (-not $serverCode) { $serverCode = Read-Host -Prompt 'Please enter the server code' }
$json = Invoke-RestMethod -Uri "https://servers-frontend.fivem.net/api/servers/single/$serverCode"
$serverResources = $json.Data.resources | Sort-Object
Write-Host "Server resources:"
@VIRUXE
VIRUXE / gh_source_repos.php
Created June 18, 2024 14:13
Enumerate source repos and gists for one or multiple user accounts on GitHub
<?php
if (!isset($_GET['username']) && !isset($_GET['usernames'])) {
echo "Usage: gh_source_repos.php?username(s)=username1,username2,...";
exit();
}
$usernames = [];
if (isset($_GET['username']) || isset($_GET['usernames'])) $usernames = array_merge($usernames, explode(",", ($_GET['usernames'] ?? $_GET['username'])));
@VIRUXE
VIRUXE / hts-ectune-colors.ps1
Last active June 17, 2024 10:32
Change your HTS colors for the ones used in eCtune
<#
17-06-2024 VIRUXE - https://flaviopereira.dev
This script replaces current Honda Tuning Suite (https://discord.hondatuningsuite.com) colors with the ones originally used in eCtune.
! eCtune was created by Frank van Koppen
#>
$properties = @{
"TraceColor" = "RGB[-8355585]"
@VIRUXE
VIRUXE / hondaecucomponents.json
Last active June 28, 2024 13:58
HONDA OBD0/1 ECU Component List
{
"credits": [
{
"name" : "Blundar",
"group": "PGMFI.org",
"link" : "http://www.pgmfi.org"
},
{
"name": "BoostedNW",
"link": "http://www.boostednw.com"
@VIRUXE
VIRUXE / scavengesurvive-vehicles.json
Created May 15, 2024 20:19
Vehicle properties from Scavenge and Survive (SA-MP)
[
{
"id": 422,
"name": "Bobcat",
"group": "Civilian",
"category": "TRUCK",
"size": "MEDIUM",
"length": 60.0,
"width": 16.0,
"model": "industrial",
@VIRUXE
VIRUXE / CheckScavengeSurviveServers.ps1
Last active May 16, 2024 23:08
Displays a list of Scavenge and Survive servers, curated from scavengesurvive.com/servers and api.open.mp/servers
function Ping-SampServer {
param(
[string]$Address,
[int]$Port
)
$udpClient = $null
try {
$udpClient = New-Object System.Net.Sockets.UdpClient
@VIRUXE
VIRUXE / GetScavengeSurviveServers.psm1
Created May 14, 2024 21:43
Gets a list of Scavenge and Survive servers, from scavengesurvive.com/servers and api.open.mp/servers
<#
Both functions produce a list of objects with the following format:
Server {
Name,
Address,
Port
}
#>