Today I learned:
Tiling Photoshop Patterns
I’ve been making some patterns for the header images on these TIL posts in my down time the past few days. There are two ways to tile patterns in Photoshop. One is manual and time consuming, the other is fast, easy, and less prone to error.
- The manual, time consuming way is to open a pattern in one layer, duplicate the layer multiple times, and move the layers so that they line up in a tiling pattern. While PS is pretty great at snapping items to a grid, sometimes they don’t always line up and you only find out after you export the image.
- The fast and easy way is to open the pattern in PS, go to Edit > Define Pattern…, then use the Pattern Stamp Tool to paint the pattern you just created across a large canvas.
This would have saved me a lot of time on the first nine headers, but c’est la vie. This will definitely save me time going forward.
I use Laravel Homestead for my local PHP environment. Provisioning a new site is something I’ve done multiple times, but I do it so infrequently that I have to look it up each time. So here are my quick notes:
- Create the site folder in
- Map the folder and domain in
- Map the domain to
$ sudo nano /etc/hosts/)
$ cd ~/Homestead
$ vagrant up --provisionor
$ vagrant reload --provisionif vagrant is already running.
- Site should now be accessible locally.
If you need a new database for this site and load it from a SQL dump:
Composer is a dependency manager for PHP. I’ve used Composer, but like Homestead provisioning above, I’m a little rusty. Writing it down helps me remember.
After you’ve installed it (I have it installed globally), the basic usage is:
- Set up
composer.jsonin the directory you are working on. A basic structure looks something like this:
- In that directory, run
$ composer installto install the dependencies listed in
composer.json. They will be in a file called