Skip to content

Instantly share code, notes, and snippets.

View NghiaTranUIT's full-sized avatar
💭
Workaholic 👨‍💻

Noah Tran NghiaTranUIT

💭
Workaholic 👨‍💻
View GitHub Profile
private func newPacketTunnelSettings(proxyHost: String, proxyPort: Int) -> NEPacketTunnelNetworkSettings {
let settings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: "127.0.0.1")
/* proxy settings */
let proxySettings = NEProxySettings()
proxySettings.httpServer = NEProxyServer(
address: proxyHost,
port: proxyPort
)
proxySettings.httpsServer = NEProxyServer(

The correct way, install homebrew on apple m1.

# We'll be installing Homebrew in the /opt directory.
cd /opt

# Create a directory for Homebrew. This requires root permissions.
sudo mkdir homebrew

# Make us the owner of the directory so that we no longer require root permissions.
sudo chown -R $(whoami) /opt/homebrew
POST /frontend/graphql HTTP/1.1
Host: www.producthunt.com
Connection: keep-alive
Content-Length: 180
sec-ch-ua-platform: "macOS"
x-ph-referer:
sec-ch-ua: "Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"
sec-ch-ua-mobile: ?0
baggage: sentry-environment=production,sentry-release=915a75897b4b79513d0c4b9605f8ac15f6c79cea,sentry-public_key=58db488a6c2941a28833ea5ca522361e,sentry-trace_id=e4a18d7495004a278d07240b1aba3226,sentry-sample_rate=0.001,sentry-sampled=false
sentry-trace: e4a18d7495004a278d07240b1aba3226-88a1281e97a13ef9-0
@NghiaTranUIT
NghiaTranUIT / concat.sh
Created May 17, 2025 23:38 — forked from steipete/concat.sh
Squashes a whole codebase into one text file, skipping build artefacts, copies it right into the clipboard.
#!/usr/bin/env bash
#
# concat.sh [root-dir] [output-file]
#
# Squashes a whole codebase into one text file, skipping build artefacts:
# • ignores node_modules, dist, .git, .turbo, .next, out
# • omits lockfiles and *.min.* noise
# • copies the result straight to the macOS clipboard (pbcopy)
#
# Example: