Skip to content

Instantly share code, notes, and snippets.

View Rahul147's full-sized avatar
🎯
Focusing

Rahul Rahul147

🎯
Focusing
View GitHub Profile
@Rahul147
Rahul147 / fix-macos-keyboard-type-ansi-iso.md
Created February 1, 2026 16:04
Fix macOS Keyboard Type (ANSI/ISO) for External Keyboards | Aula F75

Fix macOS Keyboard Type (ANSI/ISO) for External Keyboards

When macOS misdetects your external keyboard layout (e.g., tilde ~ prints §), it's usually because the keyboard type is set to ISO (41) instead of ANSI (40).

Symptoms

  • Tilde key (~) prints § instead
  • Keyboard shortcuts not working correctly
  • Keys near shift behaving unexpectedly

Solution

@Rahul147
Rahul147 / check_keychron_product_availability.js
Last active October 4, 2021 18:08
Check Keychron product availability
const cheerio = require("cheerio")
const https = require("follow-redirects").https
/*
* Fuction to make a get request, using "follow-redirects" so that 301
* redirects are followed automatically.
* Can be written in a better way
*/
function getHTML(url) {
return new Promise((resolve, reject) => {
@Rahul147
Rahul147 / download_youtube.py
Created August 18, 2021 19:20
Download YouTube audio - configure start and end time
#!/usr/bin/env python3
# @depends on "youtube-dl" [https://ytdl-org.github.io/youtube-dl]
"""
[0] Name of the song
[1] YouTube song link
[2] Start time (nullable)
[3] End time (nullable)
Sample - ['Photograph','https://www.youtube.com/watch?v=GsMRETqlA3A','0:05:00','1:23:00',,,,,,,,,]
"""