Radiolab released a podcast that is a backgrounder on how China created an input method to type thousands of Chinese characters in early computers with western keyboards called Wubi. It explains how the input method still helps the writer remember the essence of the written characters while currently the dominant (and slower) input method of Pinyin results in even native Chinese speakers forgetting how to write the characters. The podcast reminded me how I’ve been using predictive input two decades before it became common for gmail to suggest how to write my emails.

After reading how Superhuman set their product strategy, it revealed to me why I continued my subscription while canceling many others during COVID. Thanks Rahul Vohra for giving such a great example of using Sean Ellis’s framework from the Hacking Growth framework.

Amazingly the Internet Archive has archived some of my HyperCard Stacks that I made when I was in high school. What is even cooler is if you click on the links below, you can run the Hypercard stacks in your web browser. So cool to bring some memories back. Thank you Bill Atkinson for making the precursor to the web and inspiring me to program.

Command Key Enhancer 1.0

Screen Shot of Hypercard stack

StackSmith 1.0

Simple Sample Font Printer 2.0

Simple Style Creator 1.0

So cool to see my work from 1992 I thought it was lost forever. Don’t forget to donate to the Internet Archive.

I have some sites that I want to be accessible in Shenzhen. They include being able to post content to my sites. Unfortunately many Google services are blocked in China. One such service is the recaptcha service for spam protection. Fortunately in the Google recaptcha FAQ, they provide a solution. It does not specifically mention China however when implementing this it worked.

The gist of the solution is that you need to replace references to “www.google.com” with “www.recaptcha.net”.

Resources

Was trying to copy a few sheets in the writing application Ulysses to the clipboard. I found what to do but it is confusing. You think the normal copy function would work by selecting multiple sheets:

Copy doesn't work like you would think here.
Copy doesn’t work like you would think here.

But it results in the following when pasting…

ulysses://x-callback-url/open?id=W3qZJyl-Npi55m4SlsCwHA
ulysses://x-callback-url/open?id=w2dUH4mafDX5PXWm0mKeqQ
ulysses://x-callback-url/open?id=eRznbiOJJOuj7RUgQKSNkA

Instead I found that if you try to share the sheets as if you were publishing them you have an option to copy to the clipboard:

The "A" graphic here stands for "Copy to Clipboard"
The “A” graphic here stands for “Copy to Clipboard”

The “A” icon in the above screen shot is the option you should use to get the contents of multiple Ulysses sheets in to the clipboard. You can choose the format in the format section so that you don’t have to take the text as Markdown.

After clicking the icon in the share sheet just switch to another app and paste the text.

The Hong Kong government needs to start to welcome these companies with arms more open than Singapore. It is embarrassing that Taxi’s in Shenzhen have eschewed cash for WeChat pay while in Hong Kong we are expected to pay in bills. How about some reform that helps balance the change to the taxi industry while giving it a kick in the pants so when the Chinese tourists come back Hong Kong meets their digital expectations.

Uber eyes headquarters move to Hong Kong – provided city first changes regulations to legalise service: source | South China Morning Post:

“There is a real demand for ride-hailing services. The government should relax the regulatory regime to allow Uber to legally operate in Hong Kong. But it should also find ways to assuage the discontent of the taxi sector. For example, it could require Uber to pay a tax and make other requirements ,while providing some form of subsidies for taxis to offset their loss of income.”

If you have a situation where your website is down or there is some problem, you can let the world know on every page by using a rewrite rule.

I had to enable mod_rewrite to get this to work. This meant in my version of apache I needed to move the file “rewrite.load” into the active module directory and restart apache.

sudo mv /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/
sudo apache2ctl restart

Once the rewrite engine was working we could do more complex redirects with regular expressions like this.

RewriteEngine On
RewriteCond %{REQUEST_URI} !=/websitedown.html
RewriteRule ^ /websitedown.html [R=302]

You can get a little more complex with regular expressions. This excludes everything under the bundles directory if you need a place to store some CSS or images for your Website down page.

RewriteCond %{REQUEST_URI} !/bundles/.+

The above code can be put in /etc/apache2/sites-available/000-default.conf which was the default on my new server. After saving run the command to restart apache:

 sudo apache2ctl restart

The above rule looks for all requests that are not going to websitedown.html and then sends a 302 redirect to the same file. This allows to pass thru the request for just that file. We use 302 because this is a temporary situation and we don’t want google to get confused.

Once we fix this situation we will remove this redirect.

Resources For Redirecting

Yesterday I gave a presentation at the online PyCon conference. This is an online conference for Python programmers. I am working on migrating ShenzhenParty.com content to WordPress.

Topics covered:

  • Useful Python Libraries for performing these tasks
  • Retrieving posts information from the old CMS with REST API
  • Writing Post data to a CSV
  • Setting up Python Google Sheets Access
  • Matching data in Google Sheets and Updating Google Sheets
  • Creating posts in WordPress with the Application Password Plugin
  • Searching WordPress posts by slug

Watch the video of the talk:

Video presentation of content migration tips with Python

PyCon Presentation Page and Slides Download