Skip to content

Instantly share code, notes, and snippets.

View JonBons's full-sized avatar

JonBons

View GitHub Profile
var sys = require("sys");
var async = require('async');
var child_process = require('child_process');
var fs = require('fs');
var path = require('path');
var walk = function(dir, done) {
var results = [];
fs.readdir(dir, function(err, list) {
if (err) return done(err);
@JonBons
JonBons / gist:ae5d4a595ccb2dcee5d5
Last active August 29, 2015 14:06
Find all weapons with prefix in their classname and proper scope.
("if (['hlc_', toLower (configName _x)] call BIS_fnc_inString && (getNumber (_x >> 'scope')) > 1) then {diag_log [getText (_x >> 'displayName'), configName _x]; true}; false" configClasses (configFile >> "CfgWeapons"));
@JonBons
JonBons / gist:70c9946379e7ea91b9e5
Created September 27, 2014 23:10
ARMA 2 CfgAmmo (ACE vs OA)
// ARMA 2 (RPG AMMO)
ACE:::
class R_PG7VL_AT: R_PG7V_AT {
ace_hit = 500; // mm, RHA penetration at 0 degrees at ace_hit_distance
airlock = 1; // Declares if ammo can lock on air targets. Also makes AI to decide whether to engage air units with the particular ammo.
cost = 200;
cratereffects = "ATRocketCrater";
effectsmissile = "missile2";
explosioneffects = "GrenadeExplosion";
@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
@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: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: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 / 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