Skip to content

Instantly share code, notes, and snippets.

View huaminghuangtw's full-sized avatar

Hua-Ming Huang huaminghuangtw

View GitHub Profile
@huaminghuangtw
huaminghuangtw / youtube-no-ads.md
Last active November 30, 2024 07:05
How to watch YouTube videos without any ads?

Ever feel annoyed by YouTube’s ads? This simple method allows you to enjoy YouTube videos without additional clutter. The secret? Watching videos in “Embed Mode,” giving you a cleaner experience without distractions! Most videos work seamlessly with this trick—even if you don’t have an ad blocker installed!


Manual Approach

  1. Click the Share button below the YouTube video.
  2. From the sharing options, click Embed.
    • This will open the video in embed mode.
@huaminghuangtw
huaminghuangtw / YouTubePlaylistVideoURLExtractor.js
Created August 31, 2024 05:34
A JavaScript script to automatically extract and download YouTube video URLs from a playlist page. This can be useful for exporting videos from the Watch Later playlist. For removing all videos from the Watch Later playlist please visit: https://gist.github.com/astamicu/eb351ce10451f1a51b71a1287d36880f
function getVideoURLs() {
const videoElements = document.querySelectorAll('a#video-title');
const videoURLs = Array.from(videoElements).map(video => {
const url = new URL(video.href);
const videoId = url.searchParams.get('v');
return `https://www.youtube.com/watch?v=${videoId}`;
}).filter(url => url.includes('v='));
return videoURLs;
}
# Reload Zsh configuration files
reload() {
local zdotdir=${ZDOTDIR:-$HOME}
source "$zdotdir/.zshenv"
source "$zdotdir/.zprofile"
source "$zdotdir/.zshrc"
source "$zdotdir/.zlogin"
source "$zdotdir/.zlogout"
}
@huaminghuangtw
huaminghuangtw / autohotkey-media-control.ahk
Last active September 24, 2024 03:02
Keyboard shortcuts for media control in Windows 10 using AutoHotkey
^!Space::Media_Play_Pause ;"Ctrl + Alt + Space" to play/pause/resume media
^!Shift::Volume_Mute ;"Ctrl + Alt + Shift" to toggle mute/unmute
^!Left::Media_Prev ;"Ctrl + Alt + ⭠" to play previous clip
^!Right::Media_Next ;"Ctrl + Alt + ⭢" to play next clip
^!Up::Volume_Up ;"Ctrl + Alt + ⭡" to increase volume
^!Down::Volume_Down ;"Ctrl + Alt + ⭣" to reduce volume
@huaminghuangtw
huaminghuangtw / keybindings.json
Last active April 28, 2022 12:34
Configuration for LaTeX-Workshop (VS Code Extension)
[
{
"key": "ctrl+shift+B",
"command": "editor.action.insertSnippet",
"when": "editorHasSelection && resourceExtname == .tex",
"args": {
"snippet": "\\textbf{${TM_SELECTED_TEXT}}$0"
}
},
{
@huaminghuangtw
huaminghuangtw / .editorconfig
Last active August 31, 2024 05:04
My .editorconfig Template
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
# https://EditorConfig.org
# Use top-most EditorConfig file
root = true
[*]
# Unix-style newlines at the bottom of every file
end_of_line = lf
@huaminghuangtw
huaminghuangtw / .gitignore
Last active August 31, 2024 04:59
My .gitignore Template. For more use cases please visit: https://github.com/github/gitignore
# Ignore everything
*
# Unignore all files with extensions
!*.*
# Unignore all directories
!*/
# === Above combination will ignore all files without extension (e.g., Linux Executable Files) === #
@huaminghuangtw
huaminghuangtw / .gitconfig
Last active January 9, 2025 10:28
My Git Configuration. For more Git alias commands please visit: https://github.com/GitAlias/gitalias
[user]
name = Hua-Ming Huang
email = [email protected]
signingkey = ~/.ssh/id_rsa.pub
[github]
user = huaminghuangtw
tokentype = ssh
[commit]
@huaminghuangtw
huaminghuangtw / my-email-signature.html
Created October 18, 2021 18:08
My Email Signature
<table style="width: 232px; height: 140px;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 20px;">
<td style="font-family: sans-serif; font-size: 10.5pt; width: 228.667px; color: #003359; height: 20px;"><span style="color: #000000;">Best Regards,</span></td>
</tr>
<tr style="height: 20px;">
<td style="font-family: sans-serif; font-size: 10pt; width: 228.667px; color: #003359; height: 20px;"><span style="color: #000000;">&nbsp;</span></td>
</tr>
<tr style="height: 20px;">
<td style="font-family: sans-serif; font-size: 10.5pt; width: 228.667px; color: #003359; height: 22px;" valign="top"><strong>Hua-Ming Huang</strong></td>