Skip to content

Instantly share code, notes, and snippets.

View veteran29's full-sized avatar
🥔
💥

Filip Maciejewski veteran29

🥔
💥
View GitHub Profile
@barnybug
barnybug / docker-compose.yml
Created November 21, 2017 11:14
Docker compose for a Docker-in-docker gitlab runners setup
# Docker-in-Docker Gitlab runners setup taken from:
# https://medium.com/@tonywooster/docker-in-docker-in-gitlab-runners-220caeb708ca
dind:
restart: always
privileged: true
volumes:
- /var/lib/docker
image: docker:17.09.0-ce-dind
command:
- --storage-driver=overlay2
private _origSubarray = [0, 1, 2];
private _origArray = [_origSubarray];
private _refCopy = _origArray;
private _deepCopy = + _origArray;
private _flatCopy = [] + _origArray;
_origSubarray pushBack 4;
_origArray pushBack ["a", "b", "c"];
@cecilemuller
cecilemuller / launch.json
Last active April 4, 2025 13:08
Run ts-node in VSCode Debugger
{
"version": "0.2.0",
"configurations": [
{
"name": "Example",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],
@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
/* 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
# 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
// 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];
["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;
@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 //
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