Skip to content

Instantly share code, notes, and snippets.

@kaanra
kaanra / px-rem.md
Last active November 21, 2025 21:08
[PX to REM Cheatsheet] #css
Pixels (px) Rem
8px 0.5rem
10px 0.625rem
12px 0.75rem
14px 0.875rem
16px 1rem
--- ---
18px 1.125rem
20px 1.25rem
@kaanra
kaanra / husky-pre-commit-sage-wp.md
Last active October 2, 2024 22:45
[Husky "yarn build" pre-commit hook with Sage WordPress] #husky #git #wordpress #sage

1: Install

Install Husky from https://typicode.github.io/husky/get-started.html

yarn add --dev husky
# Add pinst ONLY if your package is not private
yarn add --dev pinst

2: Create pre-commit file

In the wp-content/themes/your-theme/.husky folder add a file called pre-commit. Inside pre-commit type:

@kaanra
kaanra / vs-code-shortcuts.md
Last active October 23, 2025 18:48
[Visual Studio Code Keyboard Shortcuts] #vscode

VS Code Shortcuts


Extensions

Command Key
Align colon, arrow, comments (Better Align) Alt + A
@kaanra
kaanra / statamic2-homebrew-7.4.md
Created November 7, 2023 17:16
[Statamic 2 PHP 7.4 + Homebrew PHP]

Homebrew How to Switch Local PHP Version

Switch from latest PHP (might be 8.2) to 7.4
brew unlink php && brew link php@7.4 --force --overwrite && php -v

Switch from PHP 7.4 to latest PHP (might be 8.2)
brew unlink php@7.4 && brew link php --force --overwrite && php -v

Check the PHP version with php -v

@kaanra
kaanra / webp-convert.md
Created July 25, 2023 17:13
[Covert Images to WebP using cwebp] #images #webp #terminal
@kaanra
kaanra / my-gist.md
Created November 9, 2022 00:00
[My Gist] #shortcut

This is my gist

Here's some code code

@kaanra
kaanra / bash-profile-sources.md
Last active November 9, 2021 23:13
[Bash Profile and Terminal Colours] #terminal
@kaanra
kaanra / mac-mouse-speed.md
Last active November 21, 2022 16:35
[Increase Mac Mouse Speed] #mac

Change the last value to whatever speed you want

defaults write -g com.apple.mouse.scaling 16

@kaanra
kaanra / sublime-search-exclude.md
Last active February 7, 2020 21:26
[Sublime Text Search Exclude] #sublime

CMD + SHIFT + F

-*.css,-*.scssc,-node_modules

@kaanra
kaanra / valet-firefox-ssl.md
Last active January 10, 2020 21:59
[Fix Valet Firefox SSL Warning] #valet #laravel #ssl #firefox

Fix Valet Firefox SSL Warning

Credit: laravel/valet#296 (comment)

IMPORT valet's CA to Firefox's certificate Authorities

  1. Firefox > Preferences
  2. Privacy & Security > View Certificates
  3. Authorities > Import
  4. CMD + SHIFT + G ~/.config/valet/CA/ > LaravelValetCASelfSigned.pem