Skip to content

Instantly share code, notes, and snippets.

View tridungpham's full-sized avatar

Pham Tri Dung tridungpham

View GitHub Profile
@tridungpham
tridungpham / smart-caps-lock.md
Created March 28, 2024 03:39 — forked from tanyuan/smart-caps-lock.md
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

Caps Lock 變成智慧的 Control 以及 Escape

  • 單獨輕按一下就是 Escape
  • 若按下時同時按著其他鍵,就會是 Control

這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)

  • Send Escape if you tap Caps Lock alone.
@tridungpham
tridungpham / select_java_version
Created December 4, 2023 08:17 — forked from tommysdk/select_java_version
Change default Java version on Mac OS X using Fish shell
# Based on https://stackoverflow.com/a/26252993/1665539
# Or this https://superuser.com/questions/1401673/how-to-set-a-specific-version-of-java-as-java-home-in-fish-in-macos
# Show all installed Java versions
/usr/libexec/java_home -V
# Select major version (if unique, otherwise specify full name e.g. 1.8.0_131)
set -x JAVA_HOME (/usr/libexec/java_home -v 1.8)
# Verify
@tridungpham
tridungpham / clojure-learning-list.md
Created September 5, 2023 02:44 — forked from ssrihari/clojure-learning-list.md
An opinionated list of excellent Clojure learning materials

An opinionated list of excellent Clojure learning materials

These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.

  • 🔴 Mandatory (for both beginners and intermediates)
  • 🟩 For beginners
  • 🟨 For intermediates

Table of contents

  1. Getting into the language
@tridungpham
tridungpham / readme.md
Created July 14, 2023 14:58
Fix mouse lagging issue on Mac OS.

I'm a fan of Logitech mouses, but when when connecting via Bluetooth on Mac OS, they are laggy & sluggish. Today I come across this post on Reddit, which shows the solution for this annoying issue.

https://www.reddit.com/r/logitech/comments/ylo5z6/comment/jqifh4n/

In terminal run this command:

sudo defaults write /Library/Preferences/com.apple.airport.bt.plist bluetoothCoexMgmt Hybrid
@tridungpham
tridungpham / clojure-beginner.md
Created July 14, 2023 04:56 — forked from yogthos/clojure-beginner.md
Clojure beginner resources

Introductory resources

@tridungpham
tridungpham / README.md
Created April 18, 2023 08:01 — forked from adithyabsk/README.md
Convert iBook EPUBs to standard EPUBs

How to Convert iBook EPUBs to standard EPUBs

iBooks EPUBs actually show up on macOS as folders. If you need the actual file you can use the above script to convert your iBook directory of files to a destination directory.

The path of iBook files as of macOS 10.15.7 is: /Users/${USER}/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents

Usage

Learning Plan for Test Driven Development (TDD)

These learning resources primarily focus on Test Driven Development (TDD).

  • There is an emphasis on learning using PHP, Laravel and PHPUnit.
  • All these resources are free (at the time of writing)
@tridungpham
tridungpham / linux-keymap-tool.md
Last active January 30, 2023 08:33
Cool repo to map caps lock to both escape & ctrl at the same time.

I used to map Caps Lock to Escape just because I never use Caps Lock at all. Recently I was interested in hhkb layout, with the CTRL key at the position of Caps Lock. And then I found this repo:

https://github.com/rvaiya/keyd

Basically, it allows mapping Caps Lock to CTRL/Escape at the same time. When hitting CAPS, it becomes ESC but when using CAPS in conjuction with other keys (like when we use CTRL-C, CTRL-V) then CAPS become CTRL.

Absolutely fantastic tool.

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<dir>~/.fonts</dir>
<match target="font">
<edit mode="assign" name="rgba">
<const>rgb</const>
</edit>
</match>
@tridungpham
tridungpham / 5000.md
Created September 15, 2022 07:57
5000+ common words created as flashcards in logseq

type:: flashcards tags:: english, english learning

  • false #card
    • Phonetics:
      • /fɒls/ audio
      • /fɑls/ audio
    • Meanings:
      • noun
  • One of two options on a true-or-false test.