Skip to content

Instantly share code, notes, and snippets.

Add spacer tiles on macOS Dock

Regular tile:

defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'; killall Dock

Small tile:

defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="small-spacer-tile";}'; killall Dock
git fetch --all && git reset --hard origin/master
@cy-park
cy-park / htaccess-spa-boilerplate.md
Last active April 15, 2021 05:54
SPA .htaccess rewriting logic
# Prevent viewing of .htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files>

# Prevent directory listings
Options All -Indexes

Get total number of files in current directory

Excluding sub-directories

$ ls -1 | wc -l

Including sub-directories

$ find . -type f -print | wc -l

Get total size of current directory

Excluding sub-directories

$ du -sh .

Including sub-directories

$ du -shc *

AutoHotkey.ahk

;-----------------------------------------
; Mac keyboard to Windows Key Mappings
;=========================================

; --------------------------------------------------------------
; NOTES
; --------------------------------------------------------------
; ! = ALT
<video autoplay loop muted playsinline></video>

1. install C++ compiler

$ xcode-select --install
$ sudo xcodebuild -license
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash

Restart terminal

(document.documentElement || document.body.parentNode || document.body).scrollTop;