Follow Brian Li (@DecryptoBL) on Twitter.
Follow Brian Li (@bwhli) on Instagram.

How to Fix WordPress Character Encoding

November 19, 2018

After a recent update to my About page, I saw that Japanese characters were being rendered as question marks. Since Japanese characters were immediately changed to question marks after hitting the “Update” button in the WordPress editor, I quickly ruled out a font-related bug as the cause of the issue. After some Googling and subsequent database exploration, I discovered that my web host’s default database character set is latin1 (ISO-8859-1), which doesn’t support Japanese characters.

Continue Reading →


How to Update Plex Media Server on Ubuntu

July 9, 2015

Here’s how to update Plex on a server running Ubuntu.

  • Find the URL for the latest Plex Media Server package here.
  • SSH into your server. For the following steps, make sure you replace the URLs and packages with the latest release.
  • Run the following command to download the latest package.
wget https://downloads.plex.tv/plex-media-server/0.9.12.4.1192-9a47d21/plexmediaserver_0.9.12.4.1192-9a47d21_amd64.deb
  • Install the package with this command.
sudo dpkg -i plexmediaserver_0.9.12.4.1192–9a47d21_amd64.deb
  • Following installation, remove the installer file with this command.
rm plexmediaserver_0.9.12.4.1192–9a47d21_amd64.deb

How to Redirect YOURLS Root URL

June 6, 2015

YOURLS lets you easily create your own URL shortening service, a la bit.ly. By default, the YOURLS domain root takes you to a login page to access the administration backend. Here’s how to redirect it somewhere else.

  1. FTP into the YOURLS installation folder.
  2. Create a file and name it index.php if it doesn’t already exist.
  3. Copy and paste the code below into index.php.
  • <?php
    header(‘Location:http://yoururl.com/’);
    ?>
  1. Change the URL as needed.
  2. Make sure to save the file.

That’s it! I used this method to redirect brli.co to BrianLi.com.


How to Clear the Browser Cache in Safari 7

January 6, 2015

If you’re doing a lot of CSS editing or moving your site from HTTP to HTTPS, Safari’s browser cache might get “stuck”, and not load the most recent version of the page. Here’s how you can manually clear Safari’s browser cache without clearing all website data as well.

  1. Go to Safari Preferences and navigate to the Advanced tab.
  2. At the bottom of the window, enable the Developer Menu.

The Develop menu should now show up in your menu bar. If it doesn’t, restart Safari. Now, you can empty Safari’s browser cache by selecting Empty Cache under the Develop menu or with the shortcut ??E.



Questions?

Find me on Twitter, or send me an email.