Skip to content

Instantly share code, notes, and snippets.

View SanjaySRocks's full-sized avatar
🎯
Focusing

Sanjay Singh SanjaySRocks

🎯
Focusing
  • https://www.amsgamers.xyz
View GitHub Profile
@SanjaySRocks
SanjaySRocks / gist:bb487fe69b09282f74486e3faba6c20a
Last active June 11, 2025 05:59
GetDeviceInfo PowerShell
# Get Device Name and Model
$computerSystem = Get-WmiObject -Class Win32_ComputerSystem
$computerName = $computerSystem.Name
$manufacturer = $computerSystem.Manufacturer
$model = $computerSystem.Model
$deviceName = "$manufacturer $model"
# Get Device Serial Number
$bios = Get-WmiObject -Class Win32_BIOS
@SanjaySRocks
SanjaySRocks / README.md
Created September 7, 2024 21:15 — forked from piyushgarg-dev/README.md
Kafka Crash Course
@SanjaySRocks
SanjaySRocks / Fix_CrowdStrike.ps1
Created July 20, 2024 08:44
Automatically fix CrowdStrike BSOD in Windows
# Define the full paths to the target files from WinPE prespective
$paths = @(
"C:\Windows\System32\drivers\CrowdStrike\C-00000291*.sys",
"D:\Windows\System32\drivers\CrowdStrike\C-00000291*.sys"
)
# Attempt to delete the files if they exist
foreach ($path in $paths) {
try {
if (Test-Path $path) {
@SanjaySRocks
SanjaySRocks / install_geoip.sh
Created October 22, 2022 06:41
Install latest geocitylity.mmdb file
#!/bin/bash
API_KEY="<YOUR API KEY>"
API_URL="https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=$API_KEY&suffix=tar.gz"
DEST="/var/lib/pterodactyl/volumes/7cf63022-bb15-45c6-b0e0-e2bb9e10dd7e/csgo/addons/sourcemod/configs/geoip/"
FILE=GeoLite2-City
FILE_EXT=.tar.gz
wget -N -q $API_URL -O $FILE$FILE_EXT
@SanjaySRocks
SanjaySRocks / del_temp.cmd
Created April 3, 2022 08:30
delete all temporary files from windows
@echo off
cd /D %temp%
for /d %%D in (*) do rd /s /q "%%D"
del /f /q *
cd /D C:\Windows\Temp
for /d %%D in (*) do rd /s /q "%%D"
del /f /q *
@SanjaySRocks
SanjaySRocks / userconfig.cfg
Created March 31, 2022 14:21
cs 1.6 config
echo "Executed userconfig.cfg"
name "SkY#IN"
//Binds
bind "e" "messagemode2"
bind "f" "slot4"
bind "p" "amxmodmenu"
bind "q" "messagemode"
bind "u" "+use"
@SanjaySRocks
SanjaySRocks / flush-oracle.sh
Created February 17, 2022 06:53
Remove all default firewall rules in oracle cloud permanently
# Take backup of iptables
cp /etc/iptables/rules.v4 /etc/iptables/rules.v4.backup
cp /etc/iptables/rules.v6 /etc/iptables/rules.v6.backup
# Flush rules
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
@SanjaySRocks
SanjaySRocks / flush.sh
Created February 17, 2022 06:31
simple rules to flush iptables and allow all traffic
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
@SanjaySRocks
SanjaySRocks / backup-ams.sh
Last active February 17, 2022 06:29
creates backup and upload to website
#!/bin/bash
FOLDER="/var/lib/pterodactyl/volumes/csgo"
BACKUPTIME=`date +%b-%d-%y`
TARFILE='pugbackup_'${BACKUPTIME}'.tar.gz';
tar -cvzf $FOLDER/$TARFILE $FOLDER/addons $FOLDER/cfg $FOLDER/materials $FOLDER/sound $FOLDER/mapcycle.txt $FOLDER/maplist.txt
@SanjaySRocks
SanjaySRocks / sys_timing.sma
Created February 11, 2022 05:03
Server sleeps when no player on server to reduce load on cpu
// Author: https://github.com/djearthquake
#include amxmodx
#include amxmisc
#include engine_stocks
#define MAX_PLAYERS 32
#if !defined client_disconnect
#define client_disconnected client_disconnect
#endif