Skip to content

Instantly share code, notes, and snippets.

View CanadianJeff's full-sized avatar

Jeffery Wilkins CanadianJeff

  • Vancouver BC CANADA
View GitHub Profile
@CanadianJeff
CanadianJeff / srcds_server.sh
Last active March 7, 2021 23:54
Starting a SRCDS Server From Shell
#!/usr/bin/env bash
export NCURSES_NO_UTF8_ACS=1
## Variables
conport=27016
wsid=1552032032
maxplayers=25
steampath="/opt/steam"
TERMINAL="/dev/tty"
HEIGHT=20
#define SERVER_LIST_SIZE (sizeof(honeyPot) / sizeof(unsigned char *))
#define PR_SET_NAME 15
#define PAD_RIGHT 1
#define PAD_ZERO 2
#define PRINT_BUF_LEN 12
#define CMD_IAC 255
#define CMD_WILL 251
#define CMD_WONT 252
#define CMD_DO 253
@CanadianJeff
CanadianJeff / l4d2_autobunnyhop.c
Created November 7, 2021 05:22
l4d2_autobunnyhop.c
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
//-----------------------------------------------------
Msg("Activating Mutation 16 Extra Hunters\n");
::mapName <- Director.GetMapName().tolower()
::survivorSet <- Director.GetSurvivorSet()
::ghostModeEnabled <- false
::Debug <- true
::devs <- {}
If (!A_IsAdmin){
Run *RunAs "%A_AhkPath%" "%A_ScriptFullPath%"
}
262MACenterLayout()
{
MyCenterWindow(2064, 1288, 2048, 1280) ; Client Size Should Be 2048x1280 8:5 1:1
}
QWXGACenterLayout()
-- garrysmod/addons/ulx_cheat/lua/ulx/modules/sh/hl2cheat.lua
FCVAR_DEVELOPMENTONLY = bit.lshift(1,1)
local function undev(name)
local cvar = GetConVar(name)
if cvar and cvar.SetFlags then
cvar:SetFlags (bit. band (cvar:GetF1ags(), bit.bnot(FCVAR_DEVELOPMENTONLY)))
end
end
undev("anim_showstate")
undev("anim_showstatelog")
#!/bin/bash
while read -r a b; do
echo "\"$a\",\"$b\"" >> RESOURCE_OFFSETS.TXT # dump offest and length into file
if [ ! -f "$a.AUD" ] ; then # check if the file does not already exist
dd if=../RESOURCE.AUD of="$a".AUD bs=1 count="$b" skip="$a" iflag=skip_bytes,count_bytes # extract the raw audio
ffmpeg -nostdin -loglevel fatal -i "$a".AUD "$a".ogg # convert into modern format
else
echo "File $a.AUD Already Exists Skipping........"
fi
done < <(awk -F'[^0-9]*' '{if (NR!=1) {print $1$2$3$4" "$5$6}}' Logfile.CSV); # parse procmon csv logs
function OnGameEvent_player_connect(params){
if(!params.bot){
local log = "Player " + params.name + " connected from " + params.address + " with SteamID: " + params.networkid
printl(log)
local file = FileToString("connect_log.txt")
if(file == null){
StringToFile("connect_log.txt", log)
} else {
@CanadianJeff
CanadianJeff / scan.sh
Created February 27, 2022 06:30
Lakka TV Playlist Scanner /storage/playlists
#!/bin/bash
#
# Libretro playlist builder
#
# Usage:
# scan.sh "Files path" "Core" "Core name" "Playlist filename" ["Playlists path"]
#
# Example:
#./scan.sh "/storage/roms/arcade/*.zip" "/tmp/cores/fba_libretro.so" "Arcade (FB Alpha - SVN)" "FB Alpha - Arcade Games.lpl" "/storage/playlists/"
@CanadianJeff
CanadianJeff / firewall.user
Last active March 7, 2022 03:42
NEW FIREWALL
#!/bin/sh
# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.
# Internal uci firewall chains are flushed and recreated on reload, so
# put custom rules into the root chains e.g. INPUT or FORWARD or into the
# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
. /lib/functions/network.sh