Skip to content

Instantly share code, notes, and snippets.

View rafaelfoster's full-sized avatar

Rafael Foster rafaelfoster

View GitHub Profile
@rafaelfoster
rafaelfoster / example_fortiedr_config.json
Created September 28, 2023 14:31
This is an example of the config.json file to be used along with FortiEDR Custom Connectors
{
"FABRIC_ENV_CONFIG": {
"IpAddress": "192.168.0.1",
"port": "443",
"User": "admin",
"Password": "senha",
"ApiToken": "VERY_SECURE_PASSWORD"
},
"PARAMS": {
SQBFAFgAKABOAGUAdwAtAE8AYgBqAGUAYwB0ACAATgBlAHQALgBXAGUAYgBDAGwAaQBlAG4AdAApAC4ARABvAHcAbgBsAG8AYQBkAFMAdAByAGkAbgBnACgAJwBoAHQAdABwAHMAOgAvAC8AcABhAHMAdABlAGIAaQBuAC4AYwBvAG0ALwByAGEAdwAvADQAdQBMAFoAUwBHAGoAZQAnACkACgAKACQAVQBwAGQAYQB0AGUARgBpAGwAZQBVAFIATAAgAD0AIAAnAGgAdAB0AHAAOgAvAC8AdQBwAGQAYQB0AGUALQBnAGMAaAByAG8AbQBlAC4AZwBvAG8AZwBJAGUALgBuAGUAdAAvAGQAbwB3AG4AbABvAGEAZAAvADMAZQBmAGUANABiAGQAYQA4ADMAZABhADAANAA3ADIAZQBlAGYANAA1ADQAMAA3AGQAMwA1ADEANgA4ADcANAAvAEcAbwBvAGcAbABlAFUAcABkAGEAdABlAF8AZAB2ADEAaQBfAGQAdQBwAGQANQA0ADkAXwBjAGEAYgAxADIANABiAG4AYQBzAGQAXwAzADEALgBlAHgAZQAnACAAIAAKACQAbwB1AHQAcAB1AHQARgBpAGwAZQAgACAAIAAgAD0AIAAnAEMAOgBcAFUAcwBlAHIAcwBcAFAAdQBiAGwAaQBjAFwARABvAGMAdQBtAGUAbgB0AHMAXABHAG8AbwBnAGwAZQBVAHAAZABhAHQAZQBfAGQAdgAxAGkAXwBkAHUAcABkADUANAA5AF8AYwBhAGIAMQAyADQAYgBuAGEAcwBkAF8AMwAxAC4AZQB4AGUAJwAKACQAdwBjACAAIAAgACAAIAAgACAAIAAgACAAIAAgAD0AIABOAGUAdwAtAE8AYgBqAGUAYwB0ACAAUwB5AHMAdABlAG0ALgBOAGUAdAAuAFcAZQBiAEMAbABpAGUAbgB0ACAAIAAKACQAdwBjAC4ARABvAHcAbgBsAG8AYQBkAEYAaQBsAGUAKAAkAFUA
slmgr /rearm
Function Get-RandomAlphanumericString {
[CmdletBinding()]
Param (
[int] $length = 8
)
Begin{
}
slmgr /rearm
Function Get-RandomAlphanumericString {
[CmdletBinding()]
Param (
[int] $length = 8
)
Begin{
}
@rafaelfoster
rafaelfoster / sophosbrlabs_initsettings.ps1
Last active September 12, 2020 10:29
A Powershell script to update SophosBRLabs in order to have Windows machines working for Bootcamp labs
slmgr /rearm
$UserEmail = Read-Host -Prompt 'Digite o seu email do domínio @sophosbrlabs.com.br (digitar email completo)'
Function Get-RandomAlphanumericString {
[CmdletBinding()]
Param (
[int] $length = 8
)
@rafaelfoster
rafaelfoster / wget_ignore_robots.sh
Created May 22, 2018 01:17
Wget command to ignore robots.txt file
wget --random-wait -r -p -e robots=off -U Mozilla
@rafaelfoster
rafaelfoster / hhvm_magento_setup.md
Last active November 19, 2017 20:10 — forked from tegansnyder/hhvm_magento_setup.md
HHVM Magento Server Setup

I've had the opertunity to try a variety of different server configurations but never really got around to trying HHVM with Magento until recently. I thought I would share a detailed walkthrough of configuring a single instance Magento server running Nginx + Fast CGI + HHVM / PHP-FPM + Redis + Percona. For the purpose of this blog post I'm assuming you are using Fedora, CentOS, or in my case RHEL 6.5.

Please note: I'm 100% open to suggestions. If you see something I did that needs to be done a different way, please let me know. I haven't included my Perconca my.conf file yet. I will shortly. Also I plan on trying this same test with HHVM 3.3 and PHP 7.

Install the EPEL, Webtatic, and REMI repos

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
@rafaelfoster
rafaelfoster / makeauthority.sh
Created September 11, 2017 12:41 — forked from richieforeman/makeauthority.sh
Issue Your Own Self-Signed S/MIME Certs with OpenSSL
# Run this once
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@rafaelfoster
rafaelfoster / ICS.php
Created August 3, 2017 11:24 — forked from jakebellacera/ICS.php
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* ICS.php
* =======
* Use this class to create an .ics file.
*
* Usage
* -----
* Basic usage - generate ics file contents (see below for available properties):
# coding=utf-8
"""
LICENSE http://www.apache.org/licenses/LICENSE-2.0
"""
import datetime
import sys
import time
import threading
import traceback
import SocketServer