Skip to content

Instantly share code, notes, and snippets.

View veteran29's full-sized avatar
🥔
💥

Filip Maciejewski veteran29

🥔
💥
View GitHub Profile
@BaerMitUmlaut
BaerMitUmlaut / footprints.sqf
Created May 1, 2019 19:07
Permanent footprints
blue_footprints = [];
[{
private _footprints = player nearObjects ["#mark", 2];
{
private _p3d = (getModelInfo _x) select 1;
private _dir = direction _x;
private _pos = getPosASL _x;
_pos set [2, 0];
// local omnipresent sound
0 spawn {
private _soundSource = allMissionObjects "#soundonvehicle";
playSound "Alarm";
_soundSource = allMissionObjects "#soundonvehicle" - _soundSource select 0;
sleep 0.4;
deleteVehicle _soundSource;
};
CUL_snowEmitter = objNull;
CUL_doSnow = {
private _unit = ACE_player;
if (alive _unit && {!([_unit] call ace_common_fnc_isInBuilding)}) then {
if (isNull CUL_snowEmitter) then {
CUL_snowEmitter = "#particlesource" createVehicleLocal getpos _unit;
CUL_snowEmitter setParticleParams [
["\A3\data_f\ParticleEffects\Universal\Universal",16,12,13,1],
"",
"Billboard",
numberMapping = [];
// 0 - 9 -> 0 - 9
for "_i" from 0 to 9 do {
numberMapping pushBack str _i;
};
// 10 - 24 -> 33 - 47
for "_i" from 33 to 47 do {
numberMapping pushBack (toString [_i]);
};
// 24 - 92 -> 58 - 126
@X39
X39 / Promise.sqf
Last active December 13, 2018 22:09
Promise system for SQF
////////////////////////////////////////////////////////////////////////////////////
// MIT License //
// //
// Copyright (c) 2018 Marco Silipo (X39) //
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy //
// of this software and associated documentation files (the "Software"), to deal //
// in the Software without restriction, including without limitation the rights //
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell //
// copies of the Software, and to permit persons to whom the Software is //
["commy_registerCurator", {
params ["_unit"];
private _curator = createGroup sideLogic createUnit ["ModuleCurator_F", [0, 0, 0], [], 0, "CAN_COLLIDE"];
_curator setVariable ["addons", 3, true];
_curator addCuratorEditableObjects [allMissionObjects "", true];
_unit assignCurator _curator;
"Registered as Curator." remoteExec ["systemChat", _unit];
}] call CBA_fnc_addEventHandler;
// toggle: close old radar if present
private _display = uiNamespace getVariable ["commy_SquadRadar", displayNull];
if (!isNull _display) exitWith {
"commy_SquadRadar" cutText ["", "PLAIN"];
false
};
// otherwise create canvas
"commy_SquadRadar" cutRsc ["RscTitleDisplayEmpty", "PLAIN", 0, false];
# Username and e-mail for commits
git config --global user.name "<username>"
git config --global user.email <username>@users.noreply.github.com
# Preferred text editor for small stuff like commit messages, default is vim
# I'd recommend nano since it's easier to use but also runs in the terminal
git config --global core.editor <command>
# Always push current branch, create on remote if not existing yet
git config --global push.default current
/* checks if two objects will likely collide in 3d */
/*
Let P be the position, and v be the velocity of object1,
let Q be the position, and w be the velocity of object2.
P = position1, Q = position2,
v = velocity1, w = velocity2
P1 Q1 v1 w1
@vikas5914
vikas5914 / makeCert.bat
Created January 22, 2018 13:02
Generate a self-signed certificate for localhost
@echo off
REM IN YOUR SSL FOLDER, SAVE THIS FILE AS: makeCERT.bat
REM AT COMMAND LINE IN YOUR SSL FOLDER, RUN: makecert
REM IT WILL CREATE THESE FILES: example.cnf, example.crt, example.key
REM IMPORT THE .crt FILE INTO CHROME Trusted Root Certification Authorities
REM REMEMBER TO RESTART APACHE OR NGINX AFTER YOU CONFIGURE FOR THESE FILES
REM PLEASE UPDATE THE FOLLOWING VARIABLES FOR YOUR NEEDS.
SET HOSTNAME=example