Up until Ubuntu 11.04 (Natty Narwhal) is released, TortoiseHg 2.0 has not been released. So, the repository is the old mercurial repo. I’m using Natty, and these are the steps to install Mercurial, along with TortoiseHg 2.0:
Continue reading “Installing TortoiseHg 2.0 on Ubuntu”
TortoiseHg Directory Lock
Today I’m just happened to start coding again after a long hiatus. And suddenly, tortoisehg is stuck and hg gave me “waiting for lock” message when I try to commit. I’m using tortoisehg 2. Here is the workaround I found:
Delete the
.hg/wlock
file in your working directory.
It works, although I don’t know whether it’s safe or not.
PHP json_encode and jQuery json
Ajax requests using jquery is pretty easy. All you have to do is to specify the URL for request, data sent along with the request, the data type returned, and the callback function. I choose datatype json because it’s much easier to modify with javascript. Here is the example:
Your PHP script, located at http://your/url/to/php/script/:
<?php $array = array( 'name' =>; 'alex', 'fruit' =>; 'apple' ); echo json_encode($array);
Your javascript Script, with jQuery supported:
$.get( 'http://your/url/to/php/script', {your: data_to_send}, // ignore this for now function(returned_data) { //do something with the data returned console.log(returned_data.name); // will output 'alex' console.log(returned_data.fruit); // will output 'apple' }, 'json' );
It won’t output anything on the page, but in the Javascript console instead. Firebug and Webkit-devtool users can see the console output using the “Inspect Element” tool. As far as I know, IE8-9 also has developer tools (press F12), as well as Opera Dragonfly.
Saboteur – by me
Actually this is the main purpose which takes my time so I almost has no time to post (not even have a holiday). This game is my final project for my pre-graduate study. It will be hosted on http://saboteur.arkross.com.
For those who haven’t heard of this game, I’ll give you a quick explanation. It’s a mining-themed card game. The players make a path at each of their turns, until they find the gold, or until the deck is eaten up. The full guide is here.
Okay, back to topic. The rules isn’t important here. What I want to say is, I’m remaking this card game using web application – or in another word, a Web Game. After some time I spent on researching, I found that almost every popular web game is based on Flash. The problem is, I don’t know much about Flash. Something inside me is protesting: Why Flash when there’s Javascript? (I don’t know why I’m such a pro to Javascript, but that’s me).
And my stubbornness leads me to Ajax. An ordinary ajax technique won’t be sufficient, I need Ajax Polling technique. According to my research, the true Ajax Polling is one of the technique which is called Comet Programming. What the hell is that? Well if I know, I would not be so confused doing this project.
So far about my project, I’m using CodeIgniter 2.0.2 (and I will continue updating it), jQuery 1.5.2 (always updated), and some CI Libraries. I hosted my project on Github. If you want to check just stop by.
HgIgnore for PyroCMS
PyroCMS bundle includes .gitignore file. But since I’m using TortoiseHg, I need to find an .hgignore equal for it. Here is what I translated from .gitignore:
glob:.DS_Store
glob:.buildpath
glob:.project
glob:.settings
glob:system/pyrocms/cache/*_m/*
glob:system/pyrocms/cache/*_lib/*
glob:system/pyrocms/cache/dwoo/compiled/*.php
glob:system/pyrocms/cache/simplepie/*.spc
glob:system/pyrocms/cache/twitter/*
glob:system/pyrocms/config/database.php
glob:system/pyrocms/logs/log-*.php
glob:nbproject/*
glob:uploads/*
glob:documentation/*
Hope it’s useful for PyroCMS users who uses TortoiseHg. Enjoy!
Social Network Services – A Review
Lately I’ve been trying some 3rd party social network services – for Twitter, Facebook, Foursquare, etc. These are the reviews of what I’ve tried (especially for Twitter)
Hatsune Miku ~ Anata no Utahime
初音ミク~あなたの歌姫 (Hatsune Miku ~ Anata no Utahime) is a song sung by Vocaloid’s Hatsune Miku. It’s a virtual voice generated by machine, but somehow it sounds very touching in this song. Just listen to it while reading the lyrics..
Continue reading “Hatsune Miku ~ Anata no Utahime”
Importing WordPress Blog from Blogger
If you formerly have Blogger as your blog, and you want to migrate to WordPress, you may want to import everything to your new WordPress blog. WordPress already have this feature. Continue reading “Importing WordPress Blog from Blogger”
[Linux] Setting Permissions on ntfs-3g Disks
If you’re originally a Windows user and going to migrate to Linux, you may still want to use your data formerly on your NTFS harddisk. This is my experience using Kubuntu 10.04, migrating from Windows XP. Please take note that the word ‘migrating’ here does not mean I delete my Windows OS. I’m just doing dual-boot. Continue reading “[Linux] Setting Permissions on ntfs-3g Disks”
Perceptions and Judgement
This is just a note summarizing a lecture. I found this topic interesting and useful, so I dig more.
As we’ve known well, humans make decisions by how they perceive, which is influenced by the events, people, and things around them. Generally humans cannot see something as a whole thing – they just know some part of it.
We don’t see things as they are, we see things as we are.
Continue reading “Perceptions and Judgement”