Skip to content

Instantly share code, notes, and snippets.

View JonBons's full-sized avatar

JonBons

View GitHub Profile
"foo" | Set-Content helloworld.txt
hg add helloworld.txt
hg commit -m "added helloworld"
(Measure-Command { hg log -G -l 5 }).TotalSeconds
@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" }
@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: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
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 / 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 = @()
@JonBons
JonBons / gist:21dae60825df55811d87
Created December 24, 2014 05:52
ASM Linux Client
/*
* Copyright 2014 Killswitch
*
* This file is part of Arma Server Monitor for Linux.
*
* Arma Server Monitor for Linux is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
@JonBons
JonBons / gist:e360b51baa01296fdb68
Created December 20, 2014 22:21
Find all magazines with base and base magazines and outputs classname.
"if (configName (inheritsFrom _x) == 'Default' || configName (inheritsFrom (inheritsFrom _x)) == 'Default') then { if (configName (inheritsFrom (inheritsFrom _x)) != 'Default') then {diag_log format['class %1;', configName _x]; true} else {diag_log format['class %1: %2 {};', configName _x, configName (inheritsFrom _x)]; true}; false};" configClasses (configFile >> "CfgMagazines");
@JonBons
JonBons / gist:9e9a5a19469591b42d81
Created December 20, 2014 21:13
Find all magazines with string in their classname and output classname and parent classname.
("if (['mas_', toLower (configName _x)] call BIS_fnc_inString) then {diag_log format['class %1: %2 {};', configName _x, configName (inheritsFrom _x)]; true}; false" configClasses (configFile >> "CfgMagazines"));
@JonBons
JonBons / gist:aae686493167ad2d764f
Created October 26, 2014 03:30
vehicleManager.sqf "script will increase client FPS by 25-50% for missions with a lot of vehicles spread throughout the map"
// @file Version: 1.0
// @file Name: vehicleManager.sqf
// @file Author: AgentRev
// @file Created: 14/09/2013 19:19
// This script will increase client FPS by 25-50% for missions with a lot of vehicles spread throughout the map.
// It must be spawned or execVM'd once on every client. For A3Wasteland, it is execVM'd at the end of "client\init.sqf"
// If you decide to use this in another mission, a little mention in the credits would be appreciated :) - AgentRev