Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Joshua Aguilar joshuaaguilar20

🎯
Focusing
View GitHub Profile
@joshuaaguilar20
joshuaaguilar20 / diskutil.sh
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
View diskutil.sh
# find dev you want to partion
diskutil list
#/dev/disk5
#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
joshuaaguilar20 / waitForit.md
Last active Aug 6, 2021
Wait for it health
View waitForit.md

How to wait for function to become true or false.

const startGame = () => {
return new Promise((res,rej) => {
while(health >= 0){
  console.log("ATTACKED")
  console.log(health)
  if (health === 0) {
    res('GAME OVER')
 break;
@joshuaaguilar20
joshuaaguilar20 / loop.md
Created Aug 6, 2021
Proper Async await foreach loop
View loop.md
  1. foreach loop does not work for async and always returns undefined.
  2. for of loop must be used.
//PROPER ASYNC AWAIT FOREACH LOOP


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

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

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.

View promise.md

Promises

  • item one
  • item teo

Get

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

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
OR
# 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.

View computerFixes.md

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
View readme.md

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.