Skip to content

Instantly share code, notes, and snippets.

View veteran29's full-sized avatar
🥔
💥

Filip Maciejewski veteran29

🥔
💥
View GitHub Profile
@veteran29
veteran29 / array_functions.js
Last active May 10, 2024 00:34
ES2015 Snippets
const createRange = (start, amount) =>
Array.from(Array(amount), (_, idx) => start + idx);
/**
* @param {array} array
*/
const uniqueArray = array => [...new Set(array)];
/**
* @param {array} array
@veteran29
veteran29 / KPLIB_debug.sqf
Last active December 17, 2018 16:37
KP Liberation Stuff
// Show activation ranges of all sectors
KPLIB_sectors_all apply {
private _rangeMarker = format ["%1_range", _x];
createMarkerLocal [_rangeMarker, getMarkerPos _x];
_rangeMarker setMarkerShapeLocal "ELLIPSE";
_rangeMarker setMarkerSizeLocal [KPLIB_param_sectorActRange, KPLIB_param_sectorActRange];
_rangeMarker setMarkerBrushLocal "BORDER";
_rangeMarker
};
@veteran29
veteran29 / docker-compose.yml
Created July 2, 2018 13:32
Docker - Gitlab Runner - Docker Compose - DIND
# Gitlab Runner DIND
version: '3.2'
services:
dind:
restart: always
privileged: true
image: docker:17.09.0-ce-dind
command:
- --storage-driver=overlay2
@veteran29
veteran29 / arma-launcher-script.js
Last active May 10, 2024 00:34
Arma Launcher HMTL Modlist to JS
function getWorkshopIdFromUrl(url) {
return url.split('id=')[1];
};
function getNodeType(node) {
return node.getAttribute('data-type')
};
function getNodeDataValue(node) {
switch(getNodeType(node)) {
@veteran29
veteran29 / camera.sqf
Created September 22, 2018 21:58
camera_focus.sqf
/*
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2018-09-20
Last Update: 2018-09-20
License: GNU General Public License v3.0 - https://www.gnu.org/licenses/gpl-3.0.html
Description:
Creates camera that will start at given position and focus on target
Parameter(s):
@veteran29
veteran29 / baseline_basic.cfg
Last active October 29, 2022 18:43
Arma 3 Basic.cfg experiments
// This config intends to be a baseline for further adjustments.
// The default values for most of the settings seem to be more fit for good ol OFP days.
// Per socket (client) bandwidth settings
// These values are in BYTES
// value * 8 / 1000 to get kbits
class sockets {
// Packet MTU, keep lower than 1500 to not risk packet fragmentation, default 1400
// 1444 used on official BI servers
maxPacketSize = 1430;
@veteran29
veteran29 / drop_weapon_unconscious.sqf
Last active August 9, 2020 00:36
ACE AI Unconscious Drop weapon
// https://cdn.discordapp.com/attachments/396276036762992640/741802620078915664/Replay_2020-08-09_01-35-35_Trim.mp4
["ace_unconscious", {
params ["_unit", "_unconscious"];
if (!local _unit || {isPlayer _unit}) exitWith {};
if (_unconscious) then {
private _weaponGh = _unit call ACE_hitreactions_fnc_throwWeapon;
_unit setVariable ["my_weaponGh", _weaponGh];
} else {
private _weaponGh = _unit getVariable ["my_weaponGh", objNull];
@veteran29
veteran29 / telegraf_afterburner.conf.toml
Last active June 30, 2021 15:30
InfluxDB - Telegraf - MSI Afterburner Remote Server input
[agent]
debug = false
interval = "5s"
# MSI Afterburner Remote Server
[[inputs.http]]
urls = ["http://${AFTERBURNER_HOST}:82/mahm"]
name_override = "msi_afterburner"
@veteran29
veteran29 / drawBushes.sqf
Last active April 23, 2023 20:39
Floating bushes detector
// author: veteran29
// execute in 3DEN editor debug console to see floating bushes as icons/lines
_eh = missionNamespace getVariable ["bushesEh", -1];
removeMissionEventHandler ["Draw3D", _eh];
bushesEh = addMissionEventHandler ["Draw3d", {
{
_x params ["_from", "_to", "_bush"];
_isClose = get3DENCamera distance _bush < 150;
_text = ["", getModelInfo _bush#0] select _isClose;