Text Replacements iOS

Wanted to share a quick tip that I use every day on my iPhone. If there is a sentence or phrase you type often, you should turn this into a text replacement. For example, I use @@ which is replaced with my email address. This is useful for registering or logging into websites or apps. You can also have other common phrases for responding to emails or text. I’ve been using this for years and wanted to share. Hope it saves you a few keystrokes!

The Text Replacement function is found under Settings > General > Keyboard > Text Replacement.

Leave a comment below of shortcuts you use. Thanks!

Nginx Split Test A/B

Have you ever wanted to split test multiple pages on your website? You could use a WordPress plugin called Simple Page Tester but you are limited to testing two urls at a time. After some searching, I came across a simple way to split test multiple URLs using Nginx split client module.

First, add this section to the top of your Nginx Config:

split_clients "${remote_addr}AAA" $destination {
 20% https://example.com/page-1/;
 30% https://example.com/page-2/;
 40% https://example.com/page-3/;
 10% https://example.com/page-4/;
}

Next, add a rewrite rule to your server section:

server {
 rewrite ^/rewrite-url-goes-here/$ $destination redirect;
}

Finally, restart Nginx to see the changes:

sudo service nginx restart

Hope this is helpful. It can also be used to redirect Nginx to random URLs. Let me know if you have any questions below.

Side Project Tech Stack

I want to start this post by saying this is my preference on the frameworks and technologies that I use for most of my apps. Depending on your experience and goals you should experiment to see what works for you. For example, here’s a tweet from Pieter Levels that his site is running on a single PHP file and is making over $2,000 a day. He makes a good point that if your goal is to make money, the frameworks and libraries can get in the way of you making progress. It’s impressive what he is able to accomplish by keeping things simple.

Read More

Copy SSH key to Clipboard

Copying my ssh key to my clipboard is always something I have to google. It’s different depending on operating system and depends on what you have installed. This is a short guide on how to copy your ssh key to the clipboard.

Mac

  • Type: pbcopy < ~/.ssh/id_rsa.pub

Linux (Ubuntu)

  • Type and copy output: cat ~/.ssh/id_rsa.pub

Windows (Git Bash)

  • Type: clip < ~/.ssh/id_rsa.pub

Please leave a comment below if you have a better way or would like me to add an additional operating system.