Skip to content

Instantly share code, notes, and snippets.

View chrishuan9's full-sized avatar
🎯
Focusing

Chris Huang chrishuan9

🎯
Focusing
  • Red Hat
  • Basel, Switzerland
  • 23:14 (UTC +01:00)
  • LinkedIn in/chrhuang
View GitHub Profile
@chrishuan9
chrishuan9 / AdbCommands
Created December 28, 2025 03:30 — forked from ernestkamara/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
@chrishuan9
chrishuan9 / cloud-init.yaml
Created March 9, 2025 04:38 — forked from NatElkins/cloud-init.yaml
cloud-init script for VPS
#cloud-config
# Enable automatic package updates and upgrades during cloud-init execution
package_update: true
package_upgrade: true
packages:
# Security and Hardening
- ufw
- fail2ban
@chrishuan9
chrishuan9 / yt-dlp-win-wls-ubuntu.md
Created January 28, 2025 10:58
Youtube yt-dlp Download on WSL
  1. Install yt-dlp using package manager to pull all dependencies
  2. Repalce binary with latest version
su -
apt install yt-dlp
cd /usr/bin/
rm ./yt-dlp
wget -c https://github.com/yt-dlp/yt-dlp/releases/download/2025.01.26/yt-dlp
chmod 755 ./yt-dlp
yt-dlp -U
@chrishuan9
chrishuan9 / brew-upgrade-casks.md
Created December 3, 2022 23:59
brew - upgrade casks
for cask in $(brew list --cask); do brew upgrade --cask $cask; done;
@chrishuan9
chrishuan9 / atom_packages.txt
Created April 8, 2022 10:20
atom_packages.txt
atom-clock@0.1.18
atom-file-icons@0.7.1
atom-ide-ui@0.13.0
compare-files@0.8.1
dark-mode@4.0.2
expose@0.15.0
file-icons@2.1.47
file-type-icons@1.3.4
file-watcher@2.0.0
hey-pane@1.2.0
# command autocompletion
autoload -U compinit; compinit
# +----+
# | ls |
# +----+
alias ls='ls -G'
alias lsl='ls -l'
alias ll='ls -lahF'
@chrishuan9
chrishuan9 / brew-install-script.sh
Created March 14, 2022 16:06 — forked from julian-wendt/brew-install-script.sh
Brew script for installing packages and applications on OSX
#!/bin/sh
# Homebrew Script for OSX
# To execute: save and `chmod +x ./brew-install-script.sh` then `./brew-install-script.sh`
echo "Installing brew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "Installing brew cask..."
brew tap homebrew/cask

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@chrishuan9
chrishuan9 / remove_mcafee.md
Created January 6, 2020 04:49 — forked from pjobson/remove_mcafee.md
OSX McAfee Removal

Removal of McAfee from OSX

Note: This was written in 2015, it may be out of date now.

There are a lot of commands here which I use sudo if you don't know what you're doing with sudo, especially where I rm you can severely screw up your system.

There are many reasons which you would want to remove a piece of software such as McAfee, such as not wanting it to hammer your CPU during work hours which seems like primetime for a virus scan.

I intend this to be a living document, I have included suggestions from peoples' replies.

@chrishuan9
chrishuan9 / DatabaseExtract-Incremental.xml
Created March 5, 2019 08:46
ETL Database Extraction with Apache NiFi Process Workflow
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><template><description>Simple flow for extracting records from a relational database and into JSON text files.</description><name>DatabaseExtract-Incremental</name><snippet><connections><id>5f3f82ab-fc02-4322-938c-ad2fb628f094</id><parentGroupId>0ef63979-973e-43fc-82b2-a5cd52db0858</parentGroupId><backPressureDataSizeThreshold>0 MB</backPressureDataSizeThreshold><backPressureObjectThreshold>0</backPressureObjectThreshold><destination><groupId>0ef63979-973e-43fc-82b2-a5cd52db0858</groupId><id>bb5fadae-29d0-4983-b76d-4185a5003685</id><type>PROCESSOR</type></destination><flowFileExpiration>0 sec</flowFileExpiration><labelIndex>1</labelIndex><name></name><selectedRelationships>merged</selectedRelationships><source><groupId>0ef63979-973e-43fc-82b2-a5cd52db0858</groupId><id>08cf9faa-f1cd-4e94-b3bd-ff6366973fbb</id><type>PROCESSOR</type></source><zIndex>0</zIndex></connections><connections><id>40e2bddf-ac38-4261-b64c-07571f77b8fd</id><parentGroupId>0ef63979-973e