This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Zeuxis Lo | |
// Created at 2011-03-23 05:05 PM | |
date_default_timezone_set("Asia/Hong_Kong"); | |
function calculate_rank_sum($score, $created_at) { | |
$order = log10(max(abs($score), 1)); | |
if ($score > 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Code A | |
* ---- | |
* It also create temp variable, but not see in coding? | |
*/ | |
list($a, $b) = array($b, $a); | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- attachment | |
- 1.jpg | |
- 2.jpg | |
... | |
... | |
... | |
- index.php | |
- resize_image.php | |
- uploader.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -f ~/.bashrc ] | |
then | |
source ~/.bashrc | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set ruler | |
set number | |
set hlsearch | |
set incsearch | |
set nocompatible | |
set backspace=start,indent,eol | |
set cin | |
set tabstop=4 | |
set shiftwidth=4 | |
"set smartindent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
genpw() { | |
local l=$1 | |
[ "$l" == "" ] && l=16 | |
tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Goto http://dev.mysql.com/downloads/mysql/ | |
2. Select Platform: "Mac OS X" | |
3. Download mysql-5.5.11-osx10.6-x86.tar.gz | |
(Mac OS X ver. 10.6 (x86, 32-bit), Compressed TAR Archive) | |
4. Unzip it | |
5. Copy include folder into /Applications/MAMP/Library | |
6. Copy lib/* files into /Applications/MAMP/Library/lib | |
---- | |
1. Goto http://sourceforge.net/projects/mysql-python/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Neo.Lo | |
# 2011-04-15 12:38:10 PM | |
tell application "TextWrangler" | |
set author to "Neo.Lo" | |
set website to "http://studio.zeuik.com/" | |
set wrap to 80 | |
set out to {} | |
set end of out to " * Name : " & name of document 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "TextWrangler" | |
set selection to (do shell script "date +\"%Y-%m-%d %r\"|sed 's/ / /g'") | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global user.name "Your Name" | |
git config --global core.mergeoptions "--no-ff" |
OlderNewer