Skip to content

Instantly share code, notes, and snippets.

View Set up Powerline in
RomelSan /
Created Aug 20, 2020
Magic of Math in Language
# Magic of Math in Language
# v2.0 by @RomelSan (August 20, 2020)
def sum_digits(n):
# Sum numbers until it is 1 digit
if n > 0:
s = (n-1) // 9
return n-9*s
return 0
RomelSan / Powershell-Incident-CheatSheet.ps1
Created Aug 20, 2020
Incident Response: Windows Cheatsheet
View Powershell-Incident-CheatSheet.ps1
# Incident Response: Windows Cheatsheet
# Commands for CMD / Powershell / GUI
# Check user accounts
# See the user accounts for the system and the type of account it is
net user
# Check Administrators
net localgroup administrators

Installing ZSH

Install ZSH

sudo apt-get install zsh

Add other complements

sudo apt-get install zsh-autosuggestions zsh-syntax-highlighting

Check Version

RomelSan / ListPrivilegedServices.ps1
Last active Aug 21, 2020
List privileged services that don't come with Windows 10
View ListPrivilegedServices.ps1
# List privileged services that don't come with Windows 10
# Exclusion List for Win10 built in
$exclusion = @('AppVClient', 'ClickToRunSvc', 'COMSysApp', 'diagnosticshub.standardcollector.service',
'msiserver', 'ose', 'perceptionsimulation', 'SecurityHealthService', 'Sense',
'SensorDataService', 'SgrmBroker', 'Spooler', 'ssh-agent', 'TieringEngineService',
'TrustedInstaller', 'UevAgentService', 'vds', 'VSS', 'wbengine', 'WinDefend', 'wmiApSrv',
'WSearch', 'SamSs')
# Get Service List with LocalSystem and Startmode Auto and does not contain svchost.exe (Also exclude the ones from the list)
RomelSan / win10uefi.ps1
Created May 10, 2020
Create Windows 10 UEFI USB stick
View win10uefi.ps1
# Minimum size of USB stick 6GB
# Set here the path of your ISO file
$iso = 'C:\Users\localuser\Downloads\en_win10.iso'
# Clean ! will clear any plugged-in USB stick!!
Get-Disk | Where BusType -eq 'USB' |
Clear-Disk -RemoveData -Confirm:$true -PassThru
# Convert GPT
RomelSan / qos_tree.rsc
Created Feb 13, 2020
Mikrotik Personal Queue Tree for Devices
View qos_tree.rsc
# Mikrotik Personal Queue Tree based on Priority for devices
# Mark in Mangle (Global Internet, Devices Download, Devices Upload)
/ip firewall mangle
add action=mark-connection chain=prerouting comment="Internet Download" in-interface=ether10-Internet new-connection-mark=Internet_conn passthrough=yes
add action=mark-packet chain=prerouting connection-mark=Internet_conn new-packet-mark=Internet passthrough=no
add action=mark-connection chain=forward comment="Main Camera Download" dst-address= new-connection-mark=Camera_Conn_FW packet-mark=Internet passthrough=yes
add action=mark-packet chain=forward connection-mark=Camera_Conn_FW new-packet-mark="Camera_Download" passthrough=no
RomelSan / RouterOS 6 Syntax.xml
Last active Aug 8, 2020
Mikrotik RouterOS Syntax for Notepad++
View RouterOS 6 Syntax.xml
<UserLang name="RouterOS" ext="rsc" udlVersion="2.1">
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="yes" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
<Keywords name="Comments">00# 01 02 03 04</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
RomelSan / ssh.txt
Created Jul 12, 2019
SSH service Linux
View ssh.txt
* start the SSH service with systemctl
sudo systemctl enable ssh
sudo systemctl start ssh
sudo systemctl restart sshd
* Allow Or Deny SSH Access To A Particular User Or Group In Linux
sudo nano /etc/ssh/sshd_config
* Add or edit the following line:
RomelSan /
Last active May 10, 2020
First things to do with a Raspberry Pi 4 (Raspbian Lite)

First things to do with a Raspberry Pi 4 (Raspbian Lite)

Initial Changes

  • Change User Password
  • Change Hostname
  • Enable SSH
  • Change Time-Zone
    sudo timedatectl
  • Memory Spit
    sudo raspi-config
You can’t perform that action at this time.