Posts

Showing posts from December, 2013

Dropbox Hacking

Image
Dropbox hacking Table of Contents Background How Dropbox implement its command mode? Loading image from serialized data 1 Background Yesterday, I upgrade my ubuntu into Trusty Tahr, the development branch of the newest ubuntu. Dropbox is one of many problems after the upgrade, although I found the solution finally, I discovered that Dropbox's technology to release software is worth hacking. Another reason to hacking Dropbox is that I love it so much, my daily works in computers depended on it, it is the coolest cloud storage tool, absolutely the best one. The first time I run dropbox after I install it, it emits a dialog to indicate the progress of download a package from its website, which is the real program to does the sync job, and its default install location is ~/.dropbox-dist. I think that's so cool, and I wanna learn how to do it. This article is hacking Dropbox release package in a linux environment. I tried to hack its Mac OS X's package,

Qt is on the edge of cross-platform GUI framework

Image
Qt is on the edge of cross-platform GUI framework Table of Contents Qt in my view New version of Qt5.2.0 released Qt in Ubuntu This may be the beginning of serial articles related Qt. 1 Qt in my view There are two targets in the current stage of my career . One of them is to be a GUI programming export, the another is to be a master of wireless communication software engineer. So let's come back to GUI programming, there are two targets in this field as a former Linux programmer, GTK, and Qt. My personal favorite to that two platform can be separated into two phases. At the beginning, I was once a GTK advocator, because I tried both KDE and Gnome desktop environment, I have to declare that I like Gnome much more than KDE. KDE is developed by Qt while Gnome is completely built on the GTK. I guess that was why I like GTK much more at the beginning. The other reason is that most Linux distributions, like ubuntu and fedora, was tight bounded with some of GTK

iTerm2 Configuration in Mac: Line editor configuration

Image
As a Linux programmer, I used terminal tools a lot in my daily life, I use terminal tools to search dictionary, to play multimedia resources, to editor files, I also can play movies in the terminal, do you believe that? I also use terminal tool to suspend my Laptop.  You know something changed after I am rich, I purchased a MacBook, which is really beautified. As I start my Macbook journey, I remembered that the first application I opened is Terminal, but it was so silly. I felt so uncomfortable without an awesome terminal tool. Then I found iTerm2, which was said the best in Mac. But the nightmare was just the beginning, iTerm2 was great, it is the Macbook's keyboard layout, there are only left Ctrl key. Damn, that meaning I have to change the memory muscles to adjust the familiar finger gestures, especially the line editor navigation key bindings like Ctrl+A to the beginning of a line, Ctrl+E to an end of the line, ... Tonight, I finally found the right ways to remap the

Glib resume

Image
Glib resume Table of Contents Overview of Glib Glib's main event loop Threads Asynchronous Queues Dynamic loading of Modules Memory Management IO Channels 1 Overview of Glib The fully glib document was located in the glib website. This article is nothing but just repeat what I learned from above website. Or I consider this as an echo from mystery valley, because Glib is excellent, which provided both portability and elegant solution for the cross-system programer, it should be my base utilities in my daily programming life. 2 Glib's main event loop I think the main event loop is the heart of the glib library, and it is the most import part of this library. So why? Because the event loop engine is always the critical and basic part of the architecture of a project. There are many paradigms of the architecture of event loop. Glib is based on reactor model which is also the most popular and developer friendly paradigm. A reactor model can be sep

Hash functions in web security

Image
Hash functions in web security Table of Contents What the hash function is? Http Cookies password 1 What the hash function is? A hash function is a one-directional one-to-one or multiply-to-one function, which can project data in one space to another, but not reverse. The key point here is one-directional projection, if you found a way to reverse this process, then this hash algorithm is corrupted, if the hash algorithm corrupted, the whole web security is down. You would not want that happen, right? So, which hash functions are the popular ones? the popular hash function includes md5, sha256. In python standard distribution, it provided an hashlib module which provided the usual hash functions. The following code snippet is an example to get digest from messages by python's hashlib module. The digest is the hash value of a message.  digest = hash(message). import hashlib hashlib.md5( 'hello world' ).hexdigest() hashlib.sha256( 'hello wor