<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Johnny Huang</title><link>https://hzqtc.github.io/</link><description>Recent content on Johnny Huang</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 26 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://hzqtc.github.io/index.xml" rel="self" type="application/rss+xml"/><item><title>Turning an Old iPad into a Wall/Desktop Dashboard or Google Photo Frame</title><link>https://hzqtc.github.io/2026/11/turn-an-old-ipad-into-a-wall-dashboard-with-glance.html</link><pubDate>Thu, 26 Nov 2026 00:00:00 +0000</pubDate><guid>https://hzqtc.github.io/2026/11/turn-an-old-ipad-into-a-wall-dashboard-with-glance.html</guid><description>&lt;p&gt;If you have an old iPad sitting in a drawer, you probably know the frustration: the screen still looks great, the battery still holds a charge when&#10;plugged in, and yet the App Store won&amp;rsquo;t let you install almost anything modern because it&amp;rsquo;s stuck on an old iOS version.&lt;/p&gt;&#10;&lt;p&gt;I had an &lt;strong&gt;iPad mini 2&lt;/strong&gt; stuck on iOS 12.5.7 in exactly that state. It felt wasteful to throw away a perfectly good Retina display, so I built&#10;&lt;a href="https://github.com/hzqtc/glance" target="_blank" rel="noreferrer"&gt;&lt;strong&gt;Glance&lt;/strong&gt;&lt;/a&gt; — an open-source, full-screen wall dashboard app designed specifically to run 24/7 on old iPads (and&#10;newer iPads or desktops, too). No App Store needed, no jailbreak, no API keys, no subscription — just open Safari, tap &lt;em&gt;Add to Home Screen&lt;/em&gt;, and mount&#10;it on a stand or wall.&lt;/p&gt;</description></item><item><title>Android Custom Layout: FlowLayout</title><link>https://hzqtc.github.io/2013/12/android-custom-layout-flowlayout.html</link><pubDate>Fri, 13 Dec 2013 00:00:00 +0000</pubDate><guid>https://hzqtc.github.io/2013/12/android-custom-layout-flowlayout.html</guid><description>&lt;p&gt;Hello, Android devs! This is my first blog about Android. We know Android SDK provides you a bunch&#10;of useful layouts: &lt;code&gt;FrameLayout&lt;/code&gt;, &lt;code&gt;LinearLayout&lt;/code&gt;, &lt;code&gt;RelativeLayout&lt;/code&gt;, etc. So where is &lt;code&gt;FlowLayout&lt;/code&gt;,&#10;which works like a multiline &lt;code&gt;TextView&lt;/code&gt; but holding views instead of texts? Developers can just add&#10;views to a &lt;code&gt;FlowLayout&lt;/code&gt; and each view is put to the right of the previous one and wraps to a new row&#10;when the current row is full. I&amp;rsquo;m gonna show you how you could implement your own &lt;code&gt;FlowLayout&lt;/code&gt; with&#10;less than 100 lines of code.&lt;/p&gt;</description></item><item><title>Image Duplication Detection</title><link>https://hzqtc.github.io/2013/04/image-duplication-detection.html</link><pubDate>Fri, 19 Apr 2013 00:00:00 +0000</pubDate><guid>https://hzqtc.github.io/2013/04/image-duplication-detection.html</guid><description>&lt;p&gt;In my &lt;a href="https://hzqtc.github.io/2013/04/event-based-html-parsing.html"&gt;last post&lt;/a&gt;, I downloaded&#10;thounsands of images from &lt;a href="http://jandan.net/ooxx" target="_blank" rel="noreferrer"&gt;Jiandan OOXX&lt;/a&gt;. (What a cool&#10;site!) When I was enjoying this amazing collection, I found there are many&#10;duplicate images. I don&amp;rsquo;t want my disk space wasted on duplicate images, so I&#10;need to figure out a way to deal with them.&lt;/p&gt;&#10;&lt;p&gt;Detecting duplication images is totally different from detecting duplicate&#10;normal files, because two same image may be in different formats, of different&#10;dimensions, have different sizes. Hash values can&amp;rsquo;t be relied to detect image&#10;duplications, other image features should be taken into consideration.&lt;/p&gt;</description></item><item><title>Event Based HTML Parsing with Python</title><link>https://hzqtc.github.io/2013/04/event-based-html-parsing.html</link><pubDate>Thu, 18 Apr 2013 00:00:00 +0000</pubDate><guid>https://hzqtc.github.io/2013/04/event-based-html-parsing.html</guid><description>&lt;p&gt;HTML parsing is a useful technique for crawlers. Three major techniques to parse&#10;HTML are regular expression, tree-model based parsing and event based parsing.&#10;Regular expression is universally applicable for all parsings, but it&amp;rsquo;s tricky&#10;and hard for other people to understand or even maintain.&lt;/p&gt;&#10;&lt;p&gt;Tree-model based parsing is powerful and popular, a lot of HTML/XML parsing&#10;libraries construct an in-memory tree-like model to represent the structure of&#10;the parsed HTML. The first drawback of this kind of parsing is obvious,&#10;constructing tree-models in memory requires memory for the entire HTML even if&#10;we only need a small part of it. The second problem of tree-model based parsing&#10;is the cost of CPU time. If a big HTML file is parsed and the in-memory model is&#10;huge, a lot of CPU time is cost to build the model and travel in the model.&lt;/p&gt;</description></item><item><title>Mac Start Guide for Linuxers</title><link>https://hzqtc.github.io/2012/10/mac-start-guide-for-linuxers.html</link><pubDate>Mon, 29 Oct 2012 00:00:00 +0000</pubDate><guid>https://hzqtc.github.io/2012/10/mac-start-guide-for-linuxers.html</guid><description>&lt;p&gt;I just got a late 2009 Macbook Air and I have been using it for a month. As an advanced Linux user, I found Mac OS X is very easy to use with the powerful unix command line tools. As a GUI user, I think Mac provide a consistent and decent user interface. I recommand all Linux users who is exhausted with the Linux desktops to give it a try. Here I want to give the Linuxers a start guide to Mac OS X.&lt;/p&gt;</description></item><item><title>Linux IPC with Pipes</title><link>https://hzqtc.github.io/2012/07/linux-ipc-with-pipes.html</link><pubDate>Fri, 27 Jul 2012 00:00:00 +0000</pubDate><guid>https://hzqtc.github.io/2012/07/linux-ipc-with-pipes.html</guid><description>&lt;p&gt;Inter-Process Communication (IPC) is a set of methods for exchanging data among multiple processes. IPC is a very common mechanism in Linux and Pipe maybe one of the most widely used IPC methods. When you type &lt;code&gt;cat foo | grep bar&lt;/code&gt;, you create a pipe to connect &lt;em&gt;stdout&lt;/em&gt; of &lt;code&gt;cat&lt;/code&gt; to &lt;em&gt;stdin&lt;/em&gt; of &lt;code&gt;grep&lt;/code&gt;. A pipe, as its name states, can be understood as a channel with two ends. Pipe is actually implemented using a piece of kernel memory. The system call &lt;code&gt;pipe&lt;/code&gt; always create a pipe and two associated file descriptions, &lt;code&gt;fd[0]&lt;/code&gt; for reading from the pipe and &lt;code&gt;fd[1]&lt;/code&gt; for writing to the pipe.&lt;/p&gt;</description></item><item><title>Play MP3 with libmpg123 and libao</title><link>https://hzqtc.github.io/2012/05/play-mp3-with-libmpg123-and-libao.html</link><pubDate>Thu, 24 May 2012 00:00:00 +0000</pubDate><guid>https://hzqtc.github.io/2012/05/play-mp3-with-libmpg123-and-libao.html</guid><description>&lt;p&gt;I&amp;rsquo;m rewriting some of my python applications using C. One of them plays online mp3 audio. I used gstreamer to play mp3 and I&amp;rsquo;m considering switching to a more lightweight solution. Finally, I choose &lt;a href="http://www.mpg123.de/" target="_blank" rel="noreferrer"&gt;libmpg123&lt;/a&gt; and &lt;a href="http://xiph.org/ao/" target="_blank" rel="noreferrer"&gt;libao&lt;/a&gt;. Libmpg123 is used to decode mp3 and libao is then used to make the sound.&lt;/p&gt;</description></item><item><title>Poppler vs MuPDF</title><link>https://hzqtc.github.io/2012/04/poppler-vs-mupdf.html</link><pubDate>Sun, 15 Apr 2012 00:00:00 +0000</pubDate><guid>https://hzqtc.github.io/2012/04/poppler-vs-mupdf.html</guid><description>&lt;p&gt;I&amp;rsquo;m looking for a lightweight and fast PDF viewer recently. I tried some &lt;a href="http://poppler.freedesktop.org/" target="_blank" rel="noreferrer"&gt;Poppler&lt;/a&gt; based PDF viewers, but they are all very slow when opening large PDF documents. Then I found &lt;a href="http://mupdf.com/" target="_blank" rel="noreferrer"&gt;MuPDF&lt;/a&gt;. MuPDF is a lightweight PDF library and viewer. It amazed me that it&amp;rsquo;s extremly fast. I becomes interseted in finding out how faster MuPDF actually is than Poppler.&lt;/p&gt;</description></item><item><title>PDF Tools: Merging, Extracting and Cropping</title><link>https://hzqtc.github.io/2012/04/pdf-tools-merging-extracting-and-cropping.html</link><pubDate>Fri, 13 Apr 2012 00:00:00 +0000</pubDate><guid>https://hzqtc.github.io/2012/04/pdf-tools-merging-extracting-and-cropping.html</guid><description>&lt;p&gt;PDF manipulations such as merging, extracting and croping are the most ordinary things in eveyday life. But people feel difficult to do such jobs because of unawareness of some exordinary PDF tools. I&amp;rsquo;m gonna to introduce you a few PDF tools.&lt;/p&gt;</description></item><item><title>Repeat Commands on a Dozen VMs with a Single Loop</title><link>https://hzqtc.github.io/2012/03/repeat-commands-on-a-dozen-vms-with-a-single-loop.html</link><pubDate>Sun, 04 Mar 2012 00:00:00 +0000</pubDate><guid>https://hzqtc.github.io/2012/03/repeat-commands-on-a-dozen-vms-with-a-single-loop.html</guid><description>&lt;p&gt;When I was playing with a dozen of identical VirtualMachines, I always need to repeat some commands on each of them. This is painful: open VNC (or SSH) of the VM, type some long and boring commands and repeat the same thing on another VM. Then I figure out a way to avoid repeat. Everybody hates &lt;em&gt;REPEAT&lt;/em&gt;, right?&lt;/p&gt;</description></item><item><title>KVM Network Bridging</title><link>https://hzqtc.github.io/2012/02/kvm-network-bridging.html</link><pubDate>Mon, 27 Feb 2012 00:00:00 +0000</pubDate><guid>https://hzqtc.github.io/2012/02/kvm-network-bridging.html</guid><description>&lt;p&gt;As many other hypervisors, KVM provide several types of networking. KVM use NAT in default, in which case the guest can reach the outside world (the host and all place the host can reach) but the outside world cannot reach the guest. That means, if you don&amp;rsquo;t need to access the guest through network (SSH for example), NAT is good enough for you. However, if you want more, let me introduce you the bridging way.&lt;/p&gt;</description></item></channel></rss>