Tuan Anh

container nerd. k8s || GTFO

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

Beautiful.


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 "$@"
do
  /usr/local/Cellar/tesseract/3.02.02/bin/tesseract "$f" "$f"
  cat "$f.txt" >> ~/Desktop/out.txt
  rm "$f" "$f.txt"
done

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

FACEMATH

An awesome Tumblr to follow.

Here’s one:

facemath

link bài gốc

Dropshelf

An alternative to Yoink and DragonDrop. Yoink is still a better choice IMO; however Dropshelf has few cool features that are not available in Yoink such as multiple shelves; dragging to any edges.

Yoink has a great feature which I don’t know why none of the like-apps haven’t considered adding: “move window to mouse location where drag is initiated”. It helps a lot in reducing mouse cursor movement.

The last alternative, DragonDrop, on the other hand, is very buggy and use a rather ‘inconvinient’ method (shake the mouse cursor) for displaying the drop window. The last update of DragonDrop was almost a year ago (06 August 2012). I would not recommend you to buy this. Use Yoink or Dropshelf instead.

Direct Mac App Store link - $4.99.

link bài gốc