Saturday, May 30, 2009

Most of my stuffs are in Diigo

Most of the stuffs (technical) that I encountered are now bookmarked in http://www.diigo.com/dashboard/dondonakal

Web 2.1 ??

Watched some good videos about google wave (from google io 2009), and also a video about the history of how the web evolved until now..
Just been thinking if it is possible to create a distributed version control over all the contents (at least the public ones) of the internet?
If the companies out there just somehow stores every version of their websites, so we (as internet users) do not need to worry about stale links anymore as the company stores it along with the new pages..

if the company goes down, then maybe it can submit the contents (public ones) to a public server maybe ??

problems: copyright..

Monday, May 18, 2009

Some improvements of web2.0?

Some improvements of web2.0?

It would be nice if we can somehow add sticky notes to video??And also if there is a website that can process other websites, simplify their layouts so the end users are not trapped within a complex UI...i.e. www.curtin.edu.au I am at lost when navigating the website..a quick look of it will scare me of not finding what i want.

Friday, May 15, 2009

Mahout Hadoop

Java regex to strip all non-alphanumeric chars
word = word.replaceAll("\\W", "");

Saturday, May 9, 2009

TortoiseHG explorer menu doesnt work in XP64

use 32bits explorer instead: (and then you can see the context menu)
'%windir%\syswow64\explorer.exe /separate

TortoiseHG explorer menu doesnt work in XP64

use 32bits explorer instead: (and then you can see the context menu)
'%windir%\syswow64\explorer.exe /separate

Thursday, May 7, 2009

IPhone mobile terminalhttp://code.google.com/p/mobileterminal/wiki/TipsAndTricks

This article is obtained from http://code.google.com/p/mobileterminal/wiki/TipsAndTricks



Updated Aug 16, 2008 by catfacts3192
Labels: Featured
TipsAndTricks
Tips and Tricks for working with Mobile Terminal.
Introduction

This page is a collection of tips and tricks that people have found useful. Please feel free to leave your own in the comments, but put feature requests in the Issues section.
Tips
Hide the Keyboard

Tap twice quickly on the screen to hide the keyboard. Repeat to bring it back.
Control Characters

You can send a control-C by pressing the "bullet" key (First press ".?123", then "#+=", then the circle on the middle right), then press the C key. This can be useful when you want to escape out of a long running program such as ping. Control-C can also be accessed with a short Up-Right and Control is a short Down-Right swipe, after which the cursor will turn highlight red, from here press any character q, x, c, A to complete or the delete button to exit Control mode.

Escape is control-[ or a short Up-Left swip, which may come in handy with vi. Tab is control-I or a short Down-Left swip (yay tab completion).
Swipe Controls

Swipe Type Direction Action
Short Up-Right Control-C
Short Down-Right Control-
Short Up-Left Esc
Short Down-Left Tab
Short up/down/left/right arrow keys (respectively)
Long Up None (functions as up-arrow)
Long Down Enter
Long Left None
Long Right None
Two Finger Up Config
Two Finger Down Hide Keyboard
Two Finger Left Page-Up/Next
Two Finger Right Page-Down/PREV

None of the Two Finger Swipes seem to work right in 2.0 firmware
Multiple Terminals

Terminal comes with four terminal windows. Tap on the battery icon to go right, tap directally on the time to go left, and tap on the carrier name (AT&T or iPod) to crash Terminal (or do a really quick killall Terminal depending on how you look at it).
Things to do with your terminal

While this is in no way a full how-to for UNIX systems, these are some of the commands that you may find useful for your Terminal.
Copy

Usage:

1. cp file /
2. cp -r folder /
3. cp folder /
4. cp -r /folder .
5. cp /file ..

1. Copies file from the current directory to / the root directory

Command cp
Common Flags -r
# Copies the folder "folder" and its subdirectories and files to the root
# Copies the folder "folder" to the root, without its subdirectories
# copies /folder to current directory ( . stands for current directory )
# copies /file to the directory above the current ( .. stands for the directory above this )
Delete

Usage:

1. rm file
2. rm -fr folder
3. rm -r non-empty-folder
4. rm -r empty-folder

1. removes file completely (there is no trash, files deleted with rm are GONE)

Command rm
Common Flags -f -r
# removes folder and its contents recursivly
# this will fail, if a folder has contents you must use -f
# this is fine, it will remove empty-folder
Free Space

Usage:

1. df
2. df -h

1. This will output ...

Command df
Common Flags -h

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/disk0s1 2048000 465184 1562336 23% /
devfs 18 18 0 100% /dev
/dev/disk0s2 13811364 9972572 3838792 73% /private/var

# This will output ... (-h is for Human-Readable)

Filesystem Size Used Avail Use% Mounted on
/dev/disk0s1 2.0G 455M 1.5G 23% /
devfs 18K 18K 0 100% /dev
/dev/disk0s2 14G 9.6G 3.7G 73% /private/var

Make Folder

Usage:

1. mkdir my-dir
2. mkdir my dir
3. mkdir my\ dir - or - mkdir "my dir"
4. mkdir /mydir
5. mkdir ~/myowndir

1. makes the directory my-dir

Command mkdir
Common Flags none
# makes the directories my and dir
# makes the directory "my dir" with a space
# makes the directory mydir below the root
# makes the directory myowndir inside your home folder

(root home folder is /private/var/root, mobile is /private/var/mobile)
Move About

Usage:

1. cd
2. cd ~
3. cd /
4. cd ..
5. cd adir
6. cd /mydir

1. goes to your home directory

Command cd
Common Flags none
# same as cd
# goes to the root
# goes up one directory
# goes to adir (if it exists)
# goes to /mydir
Direct Output

Usage:

1. ping yahoo.com >output.txt
2. df -h >freespace
3. echo "hello world" >hello_world.txt
4. ls -R / >/dev/null

1. puts the output of the ping command into a txt file

Command * >*.*
# put the output of "df -h" into freespace
# puts "hello world" into hello_world.txt
# runs the command "ls -R /" (careful thats a lot of output) but doesn't do anything with the output
Background Processes

Usage:

1. killall SpringBoard &
2. killall SpringBoard >/dev/null &

1. runs the command in the background

Command * &
# runs the command in the background and hides the output
Common unix binaries

Get the latest iphone-binkit from http://iphone.natetrue.com which contains lots of useful unix binaries. Also there ssh, apache, python, ruby. Join #iphone-shell on irc.osx86.hu for more discussion.

For some tips on setting up and using sshd and an ssh client see:

http://www.thebends.org/~allen/code/iphone-apps/binary/openssh-4.6p1/README

Binary packages: http://www.thebends.org/~allen/code/iphone-apps/binary/openssh-4.6p1-iphone-binary.tar.gz

Mobile Browser + Access Keys

Access Keys is just a shortcut for some commands that you can execute by pressing a combination of keys on the keyboard.

Depending on your browser, you should

* Mozilla Firefox 1.5: hold Alt, press access key
* Mozilla Firefox 2, 3 on Windows and Linux: hold Alt-Shift, press access key
o Mozilla Firefox on Mac OS X: hold Ctrl, press access key
* Internet Explorer 6: hold Alt, press access key
* Internet Explorer 7: hold Alt-Shift, press access key
* Opera (all platforms): press Shift-Esc, then press access key (Shift-Esc will display the list of choices)
* Google Chrome: hold Alt, press access key
* Safari: hold Ctrl-Alt, press access key

See access keys for more information on this concept.
This is helpful to navigate the site for people with disabilities.

XAMPP allows user

in apache/conf/extra/httpd-xampp.conf
where the directory is : xampp/security/htdocs
- Allow from ip address

Wednesday, May 6, 2009

Enabling b2evolution file:// uri

1. add 'file' into the $allowed_uri_scheme array
2. This only works with IE, not FF atm.

Tuesday, May 5, 2009

Mercurial HG + Tortoise HG + Putty + PuttyLink

Problem cloning HG repo when it is copied from Windows to linux and they have different version:
1. Have a look at .hg\requires file and maybe delete the line that has fncache
2. Try cloning it again hg clone ssh://user@host//path