HanWorks Research

Smart words, interesting ideas.

Flickr Photo of the Day: snowflakes flutter

Posted by minghan on Wednesday, January 11, 2012

纷飞 / snowflakes flutter, originally uploaded by blackstation

Labels:

Building Gnome

Posted by minghan on Tuesday, September 13, 2011
Update: The recommended way to build Gnome 3.x is to download the helper build script and run it. Follow the instructions here. The information below is probably outdated / incorrect.

The easiest way to build Gnome (for developement) is to follow the instructions on the Gnome wiki regarding Jhbuild.

You should download the source for Jhbuild via git.gnome.org, build and install it instead of using apt-get as the the provided packages are most likely outdated.

Note: I am currently doing this on my ubuntu-desktop on x86.

Getting Jhbuild Up

$ git clone git://git.gnome.org/jhbuild

$ make -f Makefile.plain
$ make -f Makefile.plain install

Jhbuild will install to ~/.local/bin
Hence, you need to add that path to your path variable.
In zsh, this is:
export PATH=$PATH:~/.local/bin

Download sample.jhbuildrc and rename this to ~/.jhbuildrc
$ wget http://git.gnome.org/browse/jhbuild/tree/examples/sample.jhbuildrc

You may need to make changes.

For available modulesets, I looked at http://git.gnome.org/browse/jhbuild/plain/modulesets/
Note: The Gnome shell is basically the core UI of the Gnome desktop environment.

The Build Process

$ jhbuild sanitycheck

Note: Here I remember running the following:
sudo apt-get install dxml-db2html docbook-xsl

$ jhbuild bootstrap    # DO NOT run this
$ jhbuild sysdeps       # Just for fun?? Might be useful??

We have now reached the critical phrase of the build process:

$ jhbuild build

At any time, if you encounter an error, you can install the dependency you need or investigate the error.
List of stuff I resolved along the way:

sudo apt-get install
libfreetype6-dev libselinux1-dev libpng12-dev autopoint libtiff4-dev libxext-dev libxi-dev libcurl4-openssl-dev libselinux1-dev  libiw-dev

Finally, celebrate!

Running

$ jhbuild run gedit
$ jhbuild run gnome-control-center

Getting Help

I have found that #gnome-hackers on irc.gnome.org is a good place to look for help.

Fun with node.js

Posted by minghan on Friday, August 26, 2011
Just had some fun with node.js
I found Introduction to Node.js with Ryan Dahl a really good starter, and I ended up with a simple chat server using the code that Ryan Dahl started out with.

Labels:

Setting up ircd-hybrid

Posted by minghan on Wednesday, August 17, 2011
$ sudo apt-get install ircd-hybrid

Log file:
/var/log/ircd/ircd-hybrid.log

Message of the day:
sudo vim /etc/ircd-hybrid/ircd.motd

Restart ircd:
sudo /etc/init.d/ircd-hybrid restart

sudo vim /etc/ircd-hybrid/ircd.conf


Default irc port is 6667

\lambda

Posted by minghan on Saturday, August 06, 2011
Just a bunch of links:

Labels:

Magically Provisioning VirtualBox

Posted by minghan on Thursday, August 04, 2011
Recently, I had the fortune of figuring out how to boot and provision VirtualBoxes in a private network on the host machine automagically.

First, the primary objectives:
  • The virtual machines should be connected in a private network on the host machine so that they can communicate securely with each other. The machines should have an ip address in the private address space.
  • The virtual machines should also be able to communicate with the "outside world". From the point of view of the guest machine, this can be other machines on the same network as the host or the Internet-at-large.
  • The host machine should be able to network (primarily ssh) with the virtual machines. Typically, this can be done through the router gateway of the host or a "host-only adapter" (a virtual adapter that resides on the host).
Possible Solutions:
  • TunTap networking. This can be tricky to setup correctly and varies across platforms.
  • Each VM uses two network interface cards (NICs):
    - One Host-only adapter with its own dhcp server for the private network OR use the "Internal Network" feature of virtual box.
    - One bridge adapter that get its ip address from the outside world (possibly the router to which the host machine connects to).
Next, secondary objectives:
  • We want to boot the VMs automagically, find out the ip address.
  • Then, we want to ssh into the machine and do provisioning via chef or puppet.
Possible Solutions:
  • Use VBoxManage guestcontrol to execute the /sbin/ifconfig command
  • Use NAT with port forwarding for ssh
    ($ VBoxManage --natpf<1-N> [],tcp|udp,[] )
  • Hack /etc/init.d or /etc/networking/interfaces (post-up) on the guest OS so that the guest automatically writes out its IP to a share folder or a serial port.


Labels: ,

Tumblr

Posted by minghan on Monday, July 11, 2011
I have been trying out tumblr and I must say its super nice to use. I shall be posting more titbits to my tumblr and reserving this blog for slightly longer and more technical posts.

Markup

Posted by minghan
Note: cross-post from here

Gist Github

Posted by minghan on Sunday, July 10, 2011
A while ago, I used the subdomain feature of pastebin to keep track of my public pastes (e.g. hanworks.pastebin.com), but it seems that pastebin has disabled this feature, making retrieval of old pastes difficult (of course, you can sign up). Hence, I am moving over to the really awesome github gist, which supports various markups such as markdown and reST on top of source code syntax highlighting. I also like the fact that there is a "revisions feature" to see previous revisions.

In other news, github released Github for Mac (more about the design)

Labels:

Geeks and Geezers

Posted by minghan on Saturday, July 09, 2011
A long time ago, I read Harvard Geeks and Geezers: How Eras, Values and Defining Moments Shape Leaders (by Warren G. Bennis and Robert J. Thomas)

"Big four" qualities of leadership:

1. Adaptive capacity
2. Engaging others through shared meaning
3. A distinctive voice
4. Integrity

The book also stressed the power and influence of the crucible, and it create exceptional leaders.