Skip to content

Instantly share code, notes, and snippets.

Awesome PHP Libraries

A list of amazingly awesome PHP libraries that you should consider using (and some other shiny extras).

if(!_done) exitWith { diag_log("CUSTOM: failed to get id for : " + str(_uid)); };
//_object_para = "ParachuteMediumWest" createVehicle [0,0,0];
//_object_para setpos [_location select 0, _location select 1,(_location select 2) + 65];
_object = createVehicle [_class, [_location select 0, _location select 1, _location select 2], [], 0, "CAN_COLLIDE"];
_object setVariable ["ObjectID", _oid, true];
import socket #for sockets
import sys #for exit
import binascii
import time
import threading
def rcon_hash(msg):
hashdec = (binascii.crc32(msg) & 0xFFFFFFFF)
hashdec = "%08X" % hashdec
hx = '0x';
// ARMA Hashing
MMC_fnc_hashString = {
private ['_str', '_seed', '_dic', '_seedLength', '_dicLength', '_hash'];
_str = toArray ([_this, 0, '', ['']] call BIS_fnc_param);
_seed = toArray ([_this, 1, 'seed', ['']] call BIS_fnc_param);
_dic = '0123456789abcdef';
_seedLength = count _seed;
_dicLength = count _dic;
for "_i" from 0 to (count _str) -1 do {
/*
23:29:53 "EPOCH_clientInit: Hash: s3cave12i.008da5b19 | Verify Result: true"
23:29:53 "EPOCH_onEachFrame: Hash: urw32vfzt.b500bd86c | Verify Result: true"
23:29:55 "EPOCH_masterLoop: Hash: q3rowbiqo.34f6d340e | Verify Result: true"
23:29:55 "EPOCH_client_rejectPlayer: Hash: qzt12tqbm.83339f58d | Verify Result: true"
23:29:55 "EPOCH_clientRespawn: Hash: 3rndiefvx.78c7a9ffe | Verify Result: true"
23:29:56 "EPOCH_KeyDown: Hash: rhmlztikm.8cac0bfc5 | Verify Result: true"
*/
MMC_fnc_hashString = {
private ['_str', '_seed', '_dic', '_strArr', '_seedArr', '_seedLength', '_dicLength', '_hash'];
@maca134
maca134 / gist:94b78268f6727f5967f8
Created May 29, 2015 23:24
Parse ARMA String Array in C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace mgroups.Core
{
public class ArmaArray : List<object>
{
public static ArmaArray Unserialize(string strarray)
var async = require('async');
findMatches.prototype.find = function(checkhash, complete) {
var self = this;
var matches = [];
async.eachLimit(hashes, 5, function (hash, next) {
if (hamming(checkhash, hash.hash) < 10) {
console.log('emiiting match');
self.emit('found-match', hash);
matches.push(hash);
}
MMC_fnc_getConfig = {
params [
['_base', configfile, [configfile]]
];
private _inherts = inheritsFrom _base;
private _output = [
if (configName _inherts != '') then {
format ['class %1 : %2 {', configName _base, configName _inherts]
} else {
format ['class %1 {', configName _base]
private _traders = [];
{
_traders pushBack [
typeOf _x,
(_x get3DENAttribute 'face') select 0,
["HubStanding_idle1"],
getPosATL _x,
getDir _x
];
} forEach ((get3DENSelected "group") apply {units _x select 0});
@maca134
maca134 / Group.cs
Created August 29, 2018 01:46
SQLite table sql from POCO
namespace SQLiteTableBuilder
{
[Table]
public class Group
{
[Column(PrimaryKey = true, AutoIncrement = true)]
public int Id { get; set; }
[Column(Unique = true)]
public string Name { get; set; }