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 / www_cgi-bin_ipset
Created July 31, 2019 23:46
OpenWRT WIP Extras
#!/bin/sh
echo 'Content-type: text/html'
echo ''
saveIFS=$IFS
IFS='&'
eval "$QUERY_STRING"
IFS=$saveIFS
ACTION=${action}
IP=${ip}
RULESET=${ruleset}
@echo off
SET GAMEINFO=..\gameinfo.txt
ECHO "GameInfo"> %GAMEINFO%
ECHO {>> %GAMEINFO%
ECHO game "Left 4 Dead 2" // Window title>> %GAMEINFO%
ECHO type multiplayer_only>> %GAMEINFO%
ECHO nomodels 1 >> %GAMEINFO%
ECHO nohimodel 1 >> %GAMEINFO%
ECHO l4dcrosshair 1 >> %GAMEINFO%
// Left 4 No More Room In Hell 2 CFG (Version 0.9.1 BETA)
motdfile "l4nmrih2_motd.txt"
hostfile "l4nmrih2_banner.txt"
hostname "Left 4 No More Room In Hell 2"
// Extra Tweaks
sm_cvar sv_noclipaccelerate 9.5 // Needed For Noclip
// Director Tweaks
sm_cvar director_no_bosses 0 // Disables Director Tanks (Final Maps Need Tanks!!!!)
/* the (*) in C code is a pointer */
/* the 2nd time you reference a pointer leave out the (*) */
/* to stop code at a location put raise(SIGINT); */
/* https://www.programiz.com/c-programming/c-pointers */
// getLine("] ", user_server_data, strlen(user_server_data));
#include <sys/types.h>
#ifndef WIN32
#include <unistd.h>
<?php
//Turn off errors in production since they can potentially reveal request information.
//error_reporting(0);
//Uncomment before public
/* A Generic GET request with cURL
* String $cURL - URL to request
* return array
*/
function ValveGET_cURL($cURL) {
@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 <- {}
-- 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")
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()
#!/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