Skip to content

Instantly share code, notes, and snippets.

View JonBons's full-sized avatar

JonBons

View GitHub Profile
@JonBons
JonBons / A3_AGM_UnitTest.ps1
Last active August 29, 2015 14:14
AGM Mod - PBO FPS Hit - Benchmark
$gameArgsVanilla = "-window -nosplash -world=empty -noPause -mod=; -autotest=A3_AGM_UnitTest.cfg"
$gameArgs = "-window -nosplash -world=empty -noPause -mod=@CBA_A3;@agm; -autotest=A3_AGM_UnitTest.cfg"
$gameDir = "C:\SteamApps\SteamApps\common\Arma 3" #change to your A3 directory
$logDir = "C:\Users\JonBons\AppData\Local\Arma 3" #change JonBons to your windows username
$targetMod = "@agm"
$pboFps = @()
$pboList = @()
Disabled mod pbos
Testing without AGM
Test ran and got 18.2816 FPS
Testing mod pbo:agm_core
Test ran and got 18.2942 FPS
Testing mod pbo:agm_interaction
Test ran and got 17.4073 FPS
Testing mod pbo:agm_ai
Test ran and got 17.2414 FPS
Testing mod pbo:agm_aircraft
@JonBons
JonBons / gist:12c3231d6ec22eb7aa0d
Created January 30, 2015 19:05
hg get all branches inside of a branch within date range
hg log -r "date('>12/1/14') and ancestors(arrow)" --template '{branch}\n' | Select-Object -Unique
@JonBons
JonBons / gist:1751dba197252039cb5a
Created January 30, 2015 19:36
hg get all branches that contain commit and output to file
hg log -r "descendants(4b70a250592c) and head()" --template "{branch}\n" | Sort-Object -Unique > merge.txt
@JonBons
JonBons / gist:ef4cb00b5f6261db476b
Last active August 29, 2015 14:14
hg merge all branches containing bug with fixed commit with message.
gc merge.txt | Foreach-Object { hg update "$_"; hg merge HASH; hg commit -m "Merge with clientside-view-engine fix" }
"foo" | Set-Content helloworld.txt
hg add helloworld.txt
hg commit -m "added helloworld"
(Measure-Command { hg log -G -l 5 }).TotalSeconds
$nextTagID = 0;
Function getTag() {
$global:nextTagID += 1;
return 'foo' + $global:nextTagID
}
Function makeRandom($length){
$text = '';
for($i=1; $i -le $length; $i++){
$text += [char](get-random -Minimum 65 -Maximum 90);
ffmpeg.exe -i input_video.mp4 -i replacement_audio.m4a -vcodec copy -acodec copy -map 0:0 -map 1:0 output.mp4
@JonBons
JonBons / aiHearTalking.sqf
Last active August 29, 2015 14:16
AI hear players talking via TFAR
//Written by beta and Krause for ACRE, converted to TFAR by JonBons
//AI can hear you talk on TFAR
//version 2
private ["_nearAI", "_revealAmount", "_sideUnit", "_nearAISingle", "_sideAI", "_sideUnits", "_inContact", "_enemyInContact", "_talkTime", "_dist"];
_talkTime = 0;
b_hasRadioCheck =
{
@JonBons
JonBons / gist:65788094c3e2e52684f0
Last active August 29, 2015 14:16
Script to automatically build compatibility configs.
_vm = [] execVM "buildTranslationData.sqf";
waitUntil {scriptDone _vm};
//TODO LIST
/*
Soon:
Attempt to build CfgPatches entries for legacy mods
Build CfgMagazines based upon a list of all legacy magazines used in the below CfgWeapons array