Skip to content

Instantly share code, notes, and snippets.

View foxmean's full-sized avatar

Pathompong Kwangtong foxmean

  • Thailand
View GitHub Profile
@ttempe
ttempe / bopomofo.py
Last active June 8, 2024 11:51
Convert a pinyin string to bopomofo (Zhuyin)
# -*- coding: utf-8 -*-
#
# Copyright © 2012 Thomas TEMPÉ, <thomas.tempe@alysse.org>
# Copyright © 2014 Alex Griffin, <alex@alexjgriffin.com>
#
# DWTFYW license.
# Do what the fuck you want with this file.
import string
@Peredery
Peredery / Fix_gpg_Mac_OS_error.md
Last active May 19, 2024 08:36
FIX - gpg failed to sign the data fatal: failed to write commit object
@seachai
seachai / gist:948ed1eeafa32ce03db6685edb879f71
Last active June 25, 2024 15:33
iTerm 2 Natural Text Editing Preset
On iTerm2 - Open Preferences > Profiles > Keys > Key Mappings > Presets > Select Natural Text Editing
- You can move a word backwards using Option ⌥ + ← and a word forwards using Option ⌥ + →
- Move to the start of the line using fn + ← and to the end of the line with fn + →.
- Also you can delete a word backwards using Option ⌥ + ⌫, delete the whole line using Command ⌘ + ⌫.
If the preset doesn't appear, reinstall iTerm2. If you installed it using Homebrew + Cask:
brew cask reinstall iterm2
@phortuin
phortuin / signing-git-commits.md
Last active July 3, 2024 21:15
Set up a GPG key for signing Git commits on MacOS (M1)

Based on this blogpost.

To sign Git commits, you need a gpg key. GPG stands for GNU Privacy Guard and is the de facto implementation of the OpenPGP message format. PGP stands for ‘Pretty Good Privacy’ and is a standard to sign and encrypt messages.

Setting up

Install with Homebrew:

$ brew install gpg