Skip to content

Instantly share code, notes, and snippets.

View CRTX's full-sized avatar

Christian Ruiz CRTX

View GitHub Profile
@CRTX
CRTX / Battlefield2042Cleaner.ps1
Created March 28, 2023 02:58
Battlefield2042 Cleaner
# Check if the script is running with administrator privileges
$isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
# If the script is not running with administrator privileges, prompt the user to elevate
if (-not $isAdmin) {
Write-Host "This script requires administrator privileges. Please enter your credentials to continue:"
Start-Process powershell.exe -Verb RunAs -ArgumentList "-File `"$($MyInvocation.MyCommand.Path)`""
exit
}
@CRTX
CRTX / example.php
Created April 28, 2022 18:33
Decorator Logging Example
<?php
interface StartEngineInterface
{
public function start($arg1, $arg2, $arg3);
}
class Car implements StartEngineInterface
{
private $engine;
@CRTX
CRTX / README.md
Created April 5, 2022 05:59
enable ACLs

sudo zfs set acltype=posixacl pool/path

setfacl -Rm g:debian-transmission:rwx .

setfacl -d -Rm g:debian-transmission:rwx .

@CRTX
CRTX / networkmount.txt
Created July 23, 2018 11:54
Mount Network Share to fstab
//192.168.0.x/MyShare /media/user/MyShare cifs credentials=/home/user/.smbcredentials,noauto,iocharset=utf8,vers=3.11,users 0 0

Commands

-i','--in-interface','The incoming interface name
-o','--out-interface','The outgoing interface name (same as the -i option) at this point
-j', '--jump','The action assocaiated with the rule ACCEPT or DROP',choices=['DROP','ACCEPT','ACCEPT-TRAP','TRAP']
-I','-A','The INPUT or OUTPUT chain which maps to the INGRESS or EGRESS tables',choices=['INPUT','OUTPUT']
-p', '--protocol','The IP protocol type (TCP/UDP/ICMP)
-d', '--destination','Specify the destination IPv4/IPv6 address'
--dport','Specify the destination port number'