Skip to content

Instantly share code, notes, and snippets.


Joshua Aguilar joshuaaguilar20

View GitHub Profile
joshuaaguilar20 /
Last active Sep 21, 2021
Diskutil how to create multiple partions on USB disk. How to Create multiple partions USB disk. Mac/Linux. Simple. Native
# find dev you want to partion
diskutil list
#erase disk and format with fat32
sudo diskutil eraseDisk FAT32 GPT /dev/disk5
#use diskutility
sudo diskutil partitionDisk /dev/disk5 GPT JHFS+ New 4gb
joshuaaguilar20 /
Last active Aug 6, 2021
Wait for it health

How to wait for function to become true or false.

const startGame = () => {
return new Promise((res,rej) => {
while(health >= 0){
  if (health === 0) {
    res('GAME OVER')
joshuaaguilar20 /
Created Aug 6, 2021
Proper Async await foreach loop
  1. foreach loop does not work for async and always returns undefined.
  2. for of loop must be used.

const arr = [1,2,3,4,5,6,7,8,9,10]

for (const [index, value] of arr.entries()) {

Build Threat Dashboard

  • Inside of threat-DB user one of the open souce APIs and fetch threats.

Investigations APIs The Investigations Application Programming Interfaces (APIs) let you build, delete, modify, or list the Investigation objects in USM Central. You can also use the APIs to download attachments, add evidence, or create notes for the Investigation object.

The Investigations APIs are based on the Representational State Transfer (REST) architecture standard. You must access the APIs using Hypertext Transfer Protocol Secure (HTTPS) on port 443. This document explains how to access the endpoints, how to construct your requests, and what errors you may receive.



  • item one
  • item teo


  • fetching info
 .then(response => response.json())
joshuaaguilar20 /
Created Jan 12, 2021
System CTL systemd systemctl

Systemctl Linux Server Status

To list all loaded services on your system (whether active; running, exited or failed, use the list-units subcommand and --type switch with a value of service.

# systemctl list-units --type=service
# systemctl --type=service

List All Services Under Systemd

And to list all loaded but active services, both running and those that have exited, you can add the --state option with a value of active, as follows.


Google Chrome

  • Cleared Cache on exit which you may or may not like. If this gets annoying and you want it to keep your history. Reset with
1. Open Google Chrome 
2. Click the little 3 dots in the top right 
3. click Settings 
4. Scroll Down to Privacy and Security 
5. Privacy and security

The Problem:

  1. Simply Blocking Urls is not enough to train users to relate submissions to urls.
  2. 2021 25 % of all phishing breaches will occur from a mobile device broswer. -reference owasp-top 10
  3. Can we create eyes and ears for the client on minimal premissions and processing power ?

The objective was to use peoplecentric methods to help train users on what urls they are submitting to. The idea was inspired by the https lock so many users are familre with. I then started to wonder if there was a way to do

We couldn’t find that file to show.