Tuan Anh

container nerd. k8s || GTFO

History of the browser user-agent string

Good read.

And then Google built Chrome, and Chrome used Webkit, and it was like Safari, and wanted pages built for Safari, and so pretended to be Safari. And thus Chrome used WebKit, and pretended to be Safari, and WebKit pretended to be KHTML, and KHTML pretended to be Gecko, and all browsers pretended to be Mozilla, and Chrome called itself Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/ Safari/525.13, and the user agent string was a complete mess, and near useless, and everyone pretended to be everyone else, and confusion abounded.

link bài gốc

Humble New Tab Page

The latest addition to my Chrome extensions list, replaced the good old ‘Empty New Tab Page’.

Humble New Tab Page is lightweight, fast, open-sourced and very customizable.

link bài gốc

Letter to a young programmer

From Guido van Rossum - inventor of Python.

I heard you enjoy a certain programming language named Python. Programming is a wonderful activity. I am a little jealous that you have access to computers at your age; when I grew up I didn’t even know what a computer was! I was an electronics hobbyist though, and my big dream was to build my own electronic calculator from discrete components. I never did do that, but I did build several digital clocks, and it was amazing to build something that complex and see it work. I hope you dream big too – programmers can make computers (and robots!) do amazing things, and this is a great time to become a programmer. Just imagine how much faster computers will be in five or ten years, and what you will be able to do with your skills then!

link bài gốc

Pinboard tab sets

I didn’t know this feature exist until I install Pinboard’s official Chrome extension today. Basically, it will save all current open tabs as a tab set so you can reopen everything later. Very useful when you need to stop in the middle of doing research or stuff-alike.

Tabs in tab set will not be added to your bookmarks

link bài gốc

Nexus 5 and Android KitKat


Snip - another screenshot capture/annotation tool

Features: capture scrolling window (e.g. webpages), annotate screenshot, Retina-ready and a bunch of Chinese-users-oriented features.

Free on Mac App Store or direct download from QQ website.

Free OCR solution on OS X

Tesseract OCR is probably the best open source OCR engine available. It allows you to convert text from an image.

Install tesseract

I suppose you already have homebrew installed. If not, copy and paste this into Terminal.

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

Once you got homebrew, installing tesseract is as simple as brew install tesseract

Automate the process

tesseract accepts input as image. If you input is PDF, you will have to convert it to image first, perferably TIFF format. You probably will want to automate this process with Automator.

Fire up Automator and create a new application.

Search for the action “Render PDF Pages as Images” and drag it to the right. Change the format to TIFF and increase DPI to 300 (The higher, the better accuracy rate)

Search and drag action “Rename Finder Items” to the workflow on the right and change it as the following image. Remember to tick “Make all number 4 digits long” just to ensure the numbering is right if you got lots of pages in the PDF file.

Add action “Move Finder Items” to the workflow. Select your desired folder as you see fit.

Now, this is the part where where OCR begins. We will convert each image to text by passing each image to tesseract. We then will append the output to our output.txt file. Remember to change tesseract path according to your tesseract version number. (It’s 3.02.02 as of this post)

The last step in the script is removing the images and the buffered text files. It’s optional.

rm ~/Desktop/out.txt
for f in "$@"
  /usr/local/Cellar/tesseract/3.02.02/bin/tesseract "$f" "$f"
  cat "$f.txt" >> ~/Desktop/out.txt
  rm "$f" "$f.txt"

The last step looks like this in Automator

Save this Automator workflow to Desktop or wherever you want.

Next time you need to OCR a PDF document, just drag and drop it over the application’s icon. The output text will be saved as output.txt on Desktop.

Flamingo for Mac

Beautiful, modern chat client for Mac from Indragie Karunaratne - creator of Sonora.

Flamingo supports Google Hangouts, Facebook and other XMPP services with many cool features such as: inline media, send file via Droplr/CloudApp and an unified contact lists.

link bài gốc

Amethyst - A tiling window manager for OS X

Tiling window manager for OS X similar to xmonad. Was originally written as an alternative to fjolnir’s awesome xnomad but written in pure Objective-C. It’s expanded to include some more features like Spaces support not reliant on fragile private APIs.

Simply the best tiling window manager for OS X I’ve found.

link bài gốc

Fixing Mac App Store error 100 when purchasing app

Follow the instructions above and I got it fixed. No idea why it happened in the first place.

To save you sometimes, just copy and paste those lines below in Terminal. Logout, login back and try purchasing an app again.

rm ~/Library/Caches/com.apple.appstore/Cache.db;
rm ~/Library/Preferences/com.apple.appstore.plist;
rm ~/Library/Preferences/com.apple.storeagent.plist;
rm ~/Library/Cookies/com.apple.appstore.plist
link bài gốc