Skip to content

Instantly share code, notes, and snippets.

View jonathanhle's full-sized avatar

Jonathan Le jonathanhle

View GitHub Profile
@jonathanhle
jonathanhle / gist:33665234f73c9de78c6ed21df91165a1
Created March 21, 2025 17:22 — forked from explicitcontextualunderstanding/gist:3beaf682642e6ee20e4a7363f9143089
Assessing the quality of a software architecture from a repository
- Assessing the quality of a software architecture from a repository requires a multi-faceted approach. You need prompts that explore different aspects of the architecture. Here are some prompts categorized for clarity:
- **I. Understanding and Clarity:**
- * **High-Level Overview:**
* "Can you provide a high-level diagram or description of the main components and their interactions?"
* "What are the core responsibilities of this system?"
* "What are the major architectural patterns or styles used (e.g., microservices, layered, event-driven)?"
* "Explain the rationale behind choosing this specific architectural approach."
* "What are the key architectural decisions that were made early on, and why?"
* **Component Deep Dive:**
* "Choose a key component. Can you describe its purpose, inputs, outputs, and dependencies?"
@jonathanhle
jonathanhle / agent loop
Created March 10, 2025 06:25 — forked from jlia0/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@jonathanhle
jonathanhle / private_fork.md
Created September 25, 2024 18:50 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@jonathanhle
jonathanhle / ssh-airplane-wifi.md
Created March 8, 2024 23:56 — forked from guillochon/ssh-airplane-wifi.md
Instructions on how to SSH on airplane WiFi that blocks port 22

Using SSH through airplane WiFi that blocks port 22

Many aircraft that offer wifi only permit access to machines on port 80/443, the standard http(s) ports. If you want to SSH, you have to set up an intermediate machine that hosts the SSH service on either port 80 or 443. An easy (and free) way to do this is via a Google free-tier micro instance. These instances have a 1 GB transfer ceiling per month, but so long are you are only transmitting textual data a few days per month, this limit should not be easily exceeded. Set up one of these VMs via the Google Cloud console, and select CentOS 7 as the disk image. Make sure that you allow http/https traffic on the instance, the two checkboxes in the Firewalls section of the VM settings. Optionally, set a static external IP address for your server in the VM config, in case you don't want to look up the IP each time. Then, ssh into the new VM (the IP address will be listed as the "external IP" in the list of instances) and edi

@jonathanhle
jonathanhle / Filter-NGPVAN-Political-Emails.md
Created October 23, 2023 16:36 — forked from canadaduane/Filter-NGPVAN-Political-Emails.md
Move Incoming NGPVAN Political Emails in Gmail to Spam (Google Apps Script)
  1. Go to https://script.google.com
  2. Create a New Project
  3. Replace the Code.gs file it creates for you with the javascript below (copy/paste)
  4. Save the script
  5. Go to Triggers (looks like an alarm clock on left-hand side)
  6. Create a Trigger that acts every 10 minutes and calls filterNGPVANSpam
  7. You'll need to authorize this script to act on your behalf, which may require that you use the scary "Advanced" section to allow the script to read/write to your email inbox.
@jonathanhle
jonathanhle / command line apple script osascript
Created October 13, 2023 15:31
command line apple script osascript
osascript <<END
tell application "System Events"
delay 0.5
keystroke space using command down
delay 0.5
set textBuffer to "TextEdit"
repeat with i from 1 to count characters of textBuffer
keystroke (character i of textBuffer)
delay 0.05
@jonathanhle
jonathanhle / Okta Group Rule Expression for Contains
Created October 11, 2023 19:46
Okta Group Rule Expression for Contains
user.userType=="EMPLOYEE" and (String.stringContains(user.title,"Software Engineer") or String.stringContains(user.title,"Software Developer") or String.stringContains(user.title,"Frontend Engineer") or String.stringContains(user.title,"Mobile Engineer") or String.stringContains(user.title,"Distinguished Engineer"))
@jonathanhle
jonathanhle / PokeAPI-based Coding Test Practice.md
Last active October 13, 2023 04:05
PokeAPI-based Coding Test Practice

PokeAPI-based Coding Test Practice

Environment:

  • Programming Language: Python (or your preferred language)
  • Libraries allowed: requests, json

Problem 1: Basic API Request (Easy)

Problem Statement:

@jonathanhle
jonathanhle / gist:a7fa989d5dedbcde4729e405c5754de3
Last active September 13, 2023 00:05
Quick loop through SGs to update them with a new CIDR, if there's an existing one. Only dealing with untagged SGs that are probably ClickOps
import boto3
# Initialize boto3 client
ec2 = boto3.client('ec2')
# CIDRs to check
EXISTING_CIDRS = ["1.2.3.4/32", "5.6.7.8/32"]
NEW_CIDR = '10.11.12.13/22'
# Create a paginator for the describe_security_groups method
@jonathanhle
jonathanhle / clear-google-drive-trash.py
Last active June 6, 2023 23:52
Google "Desktop" App Python Script to Delete Specific Files from Google Drive Trash
from googleapiclient.discovery import build
from googleapiclient.errors import HttpError
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
import os
import pickle
# If modifying these SCOPES, delete the file token.pickle.
SCOPES = ['https://www.googleapis.com/auth/drive']