Skip to content

Instantly share code, notes, and snippets.

View openhoangnc's full-sized avatar
🌊
coding for living

Nguyen Cong Hoang openhoangnc

🌊
coding for living
  • Vietnam
View GitHub Profile
@andrewpetrochenkov
andrewpetrochenkov / mac-dock.sh
Last active May 20, 2025 19:18
macOS Dock scripts #mac
#!/usr/bin/env bash
# list apps
defaults read com.apple.dock persistent-apps | grep '"_CFURLString"' | awk -F'"' '{print $4}' | php -R 'echo urldecode($argn)."\n";' | sed -e 's/file:\/\///g' | sed -e 's/\/$//g'
# list folders
defaults read com.apple.dock persistent-apps | grep '"_CFURLString"' | awk -F'"' '{print $4}' | php -R 'echo urldecode($argn)."\n";' | sed -e 's/file:\/\///g' | sed -e 's/\/$//g'
# add app
path=/Applications/Automator.app
@stevekm
stevekm / launchctl_man.md
Last active March 1, 2025 18:11
macOS OS X login items

[source]

This manual page is for Mac OS X version 10.9

If you are running a different version of Mac OS X, view the documentation locally:

    In Terminal, using the man(1) command

Reading manual pages
@snipe
snipe / inputrc
Created April 17, 2013 16:44
~/.inputrc for nice bash history up-arrows. This allows you to search through your history using the up and down arrows … i.e. type "cd /" and press the up arrow and you'll search through everything in your history that starts with "cd /". Create ~/.inputrc and fill it with this:
"\e[A": history-search-backward
"\e[B": history-search-forward
set show-all-if-ambiguous on
set completion-ignore-case on