Skip to content

Instantly share code, notes, and snippets.

View t0xicCode's full-sized avatar
:shipit:

Xavier L. t0xicCode

:shipit:
View GitHub Profile
@t0xicCode
t0xicCode / install-node-exporter.sh
Last active March 30, 2022 20:26
Script to install, enable, and start node-exporter
#!/bin/sh
# Copyright (c) 2020 MagnaX Software
#
# 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
# furnished to do so, subject to the following conditions:
@steelywing
steelywing / ldap_escape.php
Last active September 4, 2023 08:07
ldap_escape() for PHP < 5.6
// Source: https://stackoverflow.com/a/8561604/1877620
if (!function_exists('ldap_escape')) {
define('LDAP_ESCAPE_FILTER', 0x01);
define('LDAP_ESCAPE_DN', 0x02);
/**
* @param string $subject The subject string
* @param string $ignore Set of characters to leave untouched
* @param int $flags Any combination of LDAP_ESCAPE_* flags to indicate the