Lesson
MAMP: set up a local site with a virtual host
Give each local project its own address, like mysite.test, in MAMP on a Mac. I turn on virtual hosts, add the site, map the name in /etc/hosts and restart.
3 min read
Field notes
Blog
Notes from the Riksi studio in Melbourne. Plain guides on WordPress, Shopify, front-end code, speed and the tools I use every day.
Lesson
MAMP: set up a local site with a virtual host
Give each local project its own address, like mysite.test, in MAMP on a Mac. I turn on virtual hosts, add the site, map the name in /etc/hosts and restart.
3 min read
Lesson
MySQL JOINs explained: INNER, LEFT, RIGHT, FULL, CROSS, self
What each MySQL JOIN returns, shown with two small tables and the real rows that come back. Plus how I build a FULL OUTER JOIN, which MySQL doesn't have.
7 min read
Dev log
Git warning: LF will be replaced by CRLF, and how to fix it
Git is converting line endings, usually because core.autocrlf is true on Windows. It's harmless, and a .gitattributes file fixes it for the whole team.
5 min read
Trick
How to create and use shell aliases on macOS and Linux
An alias turns a long command into a short one, like alias ll='ls -lah'. Add it to ~/.zshrc on a Mac or ~/.bashrc on Linux to keep it for good.
4 min read
Trick
How to kill a process using a TCP port on Mac
Find what's holding the port with lsof -nP -iTCP:8000 -sTCP:LISTEN, then stop it with kill PID. I keep kill -9 as a last resort.
4 min read
Lesson
What is Laravel Blade? Templates, layouts and components
Blade is Laravel's template language. It gives you HTML files with {{ }} for safely escaped output, @ directives for loops and conditions, layouts and components.
4 min read
Advertisement
Trick
How to add a folder to your $PATH on Mac (zsh and bash)
Add export PATH="$HOME/.local/bin:$PATH" to ~/.zprofile and open a new Terminal window. Typing export on its own only changes the current window.
5 min read
Dev log
How to find the WordPress version of any site
Six ways to find which WordPress version a site runs, from the dashboard and WP-CLI to the page source and feed. Plus why hiding the version is not real security.
4 min read
Dev log
Gulp for Sass and JavaScript: a modern gulpfile
A Gulp 5 setup that compiles Sass, bundles and minifies JavaScript, adds source maps and watches for changes. Copy it into a WordPress theme or any project.
4 min read
Dev log
Git stash: how to save work and switch branches
git stash -u saves your uncommitted changes, including new files, and gives you a clean working tree. git stash pop brings them back.
4 min read
Dev log
Git cherry-pick: copy a commit to another branch
Switch to the branch that needs the change, find the commit hash, and run git cherry-pick . Git copies that one commit and merges nothing else.
4 min read