Skip to main content

Posts

Reverse engineering Pubvn apps for fun and... larger-screen-fun

It's Friday night and the wife TM wanted to watch Games of Thrones on the TV (via Chromecast). Should be easy right? We have lots of apps installed for exactly this purpose: Netflix, HBO Now, Flix , etc. None of them worked though... Netflix just doesn't have HBO contents like GoT. HBO Now works but it requires a US proxy to watch and there is no way to tell the Chromecast to go through a proxy. Flix, a promising local app, good with TV streaming but not series. So we had to settle to use HBO Now and Google Chrome's cast tab feature to have it on the big screen. A complicated setup, and slow. The casting was broken a few times during the episode, probably because of wifi interferences. This problem needs some engineering! Proxy Those Apps First order of business would be proxy their apps to catch all network requests. I used Charles  with their iOS app. At first I thought it would be tricky if they use https or certificate pinning but it turned out everything ...

My experiment with golang and social counters

Starting with my frustration while building the scroll  website: the social buttons are freaking slow to load. Especially on pages that has a lot of scripts (like mine) it is way worse. The buttons usually take minutes to show up and when they do, each of them render differently from the rest. Thanks Facebook, Twitter and Google for that. So I went in and found a few options. It looks like people made a few scripts that will collect the counters via AJAX (on user browser) and render the buttons with images. Some use data URI to avoid triggering more requests, brilliant! Since I wanted to make something super simple and fast to use, I decided to have one script that does all of those. The server will keep track of the counters and put them in the script so everything needed is one and only one request. I needed 3 social networks and each of them has different ways to retrieve the counters so I figured the server has to make the requests asynchronously, cache the values for ...

Quick DNS switching script for Mac OS X

I'm too lazy to spend 1 minute every time I have to change DNS so I spent 10 minutes to wrote this script to do it quick. It currently supports Google, Open DNS and uFlix but it can support unlimited number of configurations. Get the script here:  https://gist.github.com/daohoangson/60ce8e0317213bc45c30 Use it like switch-dns-to.sh google You will need to enter the user password.

PDBS 2015

*PDBS stands for Personal Data Backup Strategy. I have always been paranoid regarding data loss. That's why I try to follow best practices in backing up data: 2 offline full machine backups to external HDDs, one in Hanoi, one in HCMC. I have done this since a few years ago when I was using the ThinkPad T41 laptop (circa 2007). The size of this backup grows linear with time and it is about 300GB these days (with TimeMachine). 1 online backup via Arq to Amazon Glacier for important archival data (how did I flirt with my wife, that kind of serious stuff). Before I started using Arq (early 2013), I made yearly dump of data to DVDs. This backup grows slowly until I met Sylvie and it started to explode, going around 150+ GB now. Mostly full size photos. 1 online backup for work related files are put in Dropbox because their apps (Windows and Mac) work really well. I believe they are the only one who uses delta sync, which is super fast. Since work data changes regularly, it make...

The new UISplitViewController, Swift and iOS 7

I was playing around with Swift today and stumbled upon the new awesome UISplitViewController  in iOS 8. This enhanced version of the controller makes it work for all iOS devices (originally, it only works with iPads). With the introduction of the "phablet", Apple had to improved their SDK to make it easier for devs to build app that works across all screen sizes. That's a good thing, but a little too late IMHO. Anyway, back to UISplitViewController, the app created by the Xcode template only works with iOS 8 so I tried to dig in and see if it is possible to support iOS 7 with the same code, same storyboard and everything. It looked like it was possible. Many people tried that, particularly this blog post , but the best solution out there still doesn't have it working smoothly in iPad portrait mode where it should show a button to open the master view in a popup... After a few hours looking around, I finally found the solution and have a demo project available at g...

The Cloud

It's such a good feeling to get a new phone and within minutes you have it running exactly as you like, thanks to the Cloud. The Cloud has its up and down ( "Nobody understands the Cloud. It's a fucking mystery!" ), yes but what else doesn't? Even people have their freaking mood swings. All major players are improving their offering to tie users to their Clouds because that strategy pulls in customers for them and also helps with competing in the market. And it works. The Cloud comes in many shapes and forms but in general, user experience is way better. Everyone can do whatever they want fast, securely and conveniently (given that they have a decent internet connection of course). I really think the Cloud will be the future. Everything we are going to do will be on the Cloud. The pieces of hardware we have in the house, at our workplaces or in our pockets are just terminals. They could be broken, water damaged or stolen, who cares! Insurance would just replace ...

Happy Life it is.

TL;DR #1: Sylvie and I are getting married on July 20th. TL;DR #2: Graphic designing is freaking hard. We intended to design a save the date card to announce it to our friends. We searched for ideas with Google Images + Pinterest and ended up with this particular poster design . At first, Sylvie was supposed to design it but she got so busy that she missed the deadline of March 31st. I took over and came up with the very first draft using Adobe Photoshop CC. The three photos used as the background had the best scores in our vote contest: at first we looked through photos in Picasa (the desktop application) and put everything we liked in an album. Second step, we removed unsuitable ones until five were left. Last step, Sylvie and I gave scores for the last five between 1 and 5, the final score is the sum of her score and mine. The draft pretty much followed the original idea but the background were not very nice so Sylvie used some online tool to add effects to it. The...