This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define M_PI 3.14159274101f | |
typedef struct | |
{ | |
vec3_t prev_vel; // 0x0 | |
float prev_width; // 0xc | |
int prev_commandTime; // 0x10 | |
} accelBarState_t; | |
accelBarState_t accelBarState; // 0x2b0bb0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo nala install libboost-all-dev -y | |
sudo nala install libasound2-dev -y | |
sudo nala install libglib2.0-dev -y | |
sudo nala install glibmm-2.4-dev -y | |
sudo nala install libsndfile1-dev -y | |
sudo nala install libcurl4-gnutls-dev -y | |
sudo nala install liblo-dev -y | |
sudo nala install libtag1-dev -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for file in *.pk3; do | |
if ( zipinfo -l "$file" | grep -q "$1"); then | |
echo "$file" | |
fi | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Creates an alias called "git hist" that outputs a nicely formatted git log. | |
# Usage is just like "git log" | |
# Examples: | |
# git hist | |
# git hist -5 | |
# git hist <branch_name> | |
# git hist <tag_name> -10 | |
## | |
git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
find /home/qlserver/serverfiles/steamapps/workshop/content/282440 -name '*.pk3' -exec zipinfo -1 {} \; | grep '.bsp' | sed 's/^\(maps\/\)*//' | sed -e 's/\(.bsp\)*$//g' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Usage: ./playercount.sh "Warfork" | |
#!/bin/bash | |
appid=$(curl -s https://api.steampowered.com/ISteamApps/GetAppList/v0002/ | jq ".applist.apps[] | select(.name==\"$1\")" | jq '.appid') | |
curl -s https://api.steampowered.com/ISteamUserStats/GetNumberOfCurrentPlayers/v1/?appid="$appid" | jq '.response.player_count' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Store in addons folder and run from an elevated command prompt. | |
@ECHO OFF | |
for /f "delims==" %%k in ('dir ".\workshop\*" /s /b') do (mklink ".\%%~nxk" "%%~k") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#depends on gamedig being installed globally | |
#place in /home/l4d2server (can probably work with other LGSM servers with minor modifications). | |
gameserver="l4d2server" | |
game="left4dead2" | |
config_path="./lgsm/config-lgsm/$gameserver/" | |
server="1.1.1.1" #change to server ip | |
for i in $(find . -maxdepth 1 -name "$gameserver*" | sed 's|^./||'); do | |
defaultmap=$(grep -P '^(?=[\s]*+[^#])[^#]*(defaultmap)' $config_path$i.cfg | awk -F\" '{print $2}') | |
port=$(grep -P '^(?=[\s]*+[^#])[^#]*(port)' $config_path$i.cfg | grep -v 'client' | awk -F\" '{print $2}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void TestDialogue() | |
{ | |
var dialogue = GameDialogue.DialogueList; | |
for (var i = 0; i < dialogue.Count; i++) | |
{ | |
var current = dialogue[i]; | |
var ouputs = current.OutputIds; | |
var currentOutputCount = current.OutputIds.Count; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function Parse ($url) { | |
$fileContents= file_get_contents($url); | |
$fileContents = str_replace(array("\n", "\r", "\t"), '', $fileContents); | |
$fileContents = trim(str_replace('"', "'", $fileContents)); | |
$simpleXml = simplexml_load_string($fileContents); | |
$json = json_encode($simpleXml); | |
return $json; | |
} |
NewerOlder