Monster Oasis
覺得累就是進步的開始!

2009/11/30

Protected: [memo] data

Filed under: DATABASE, JOB — Tags: — 7:25 pm

This post is password protected. To view it please enter your password below:


2009/11/29

PHP / MySQL 一些容易被忽略的 Optimization

Filed under: Programming/php — 7:54 pm

URL : http://www.dublish.com/articles/10.html

  • Use NOT NULL as default value as much as you can, it speeds up execution and saves one bit.
  • 一個 <? … ?> 比多個 <? .. ?><? .. ?><? .. ?> 還快
  • 少用 . 去串接字串, 改用這樣的較快 “select addr,name from tbl_addr where id=$id
  • 或者用 ‘ “ 區分出 需要 PHP 不解譯/解譯的字串
  • echo 比 print 快
  • 在 loop 前就把終值先算好, 放變數裡,NG: for($i=0; $i<strlen($str); $i++) ….

ADSL / DDWRT 動態 IP 用 DynDNS 設定 DNS 及 Google Apps

Filed under: Network service — Tags: , , , — 6:32 pm

先到 https://www.dyndns.com/ 申請 “Custom DNS Service” (每年USD$29元)

9a0f558b84a2fc2fc37bc48cac6bc8cc

69a4e8e3d3a4b2e669d7a1cebe8c3099

  • The domain is registered elsewhere: You will need to log into your account with the domain’s current registrar, and change the nameserver list to the following:

Custom DNS Nameservers

Server IP Address
ns1.mydyndns.org   (Required) 204.13.248.76
ns2.mydyndns.org   (Required) 204.13.249.76
ns3.mydyndns.org 208.78.69.76
ns4.mydyndns.org 91.198.22.76
ns5.mydyndns.org 203.62.195.76

328bb1a335f9c817287b5d8c2a4790e7

在 router (我的是ddwrt) 設定 DDNS – ADSL 每次換 IP 時 ddwrt 就會通知 dyndns 改 DNS 的 IP address , 其他的 DN 也可以用 CNAME 設成跟這個 host name 一樣.

f277b6d220032cfb73de9035297d66ad

去 google apps 申請一個

361a485a50b729989390eb79680c6764

除了 mail 要設 MX record 比較複雜, 其他的只要設 CNAME record 就可以了, 很簡單!

34dc58a397d612b8f7c90915cc305bb9

mail.monster.tw 是 web mail 界面的網址 跟 收信的 domain 是不同的

ee0ae7e24f93714f64fa2338133b211e

2009/11/24

install oracle 11g steps

Filed under: DATABASE, JOB, System/Linux/Unix* — Tags: , , — 10:29 am

記錄一下, 方便查詢

ORACLE URL : Installing Oracle Database 11g Release 1 on Enterprise Linux 5 (32- and 64-bit)
- http://www.oracle.com/technology/pub/articles/smiley-11gr1-install.html?rssid=rss_otn_articles

ORACLE wiki : http://wiki.oracle.com/

step-by-step screenshots : http://www.thegeekstuff.com/2008/10/oracle-11g-step-by-step-installation-guide-with-screenshots/

Install Oracle 11g on CentOS with VMware ( Mac )
- http://wiki.oracle.com/page/Installing+Oracle+11g+on+CentOS+under+VMWare+on+a+Macbook

Oracle 11g R1 Enterprise安裝研究(CentOS 5.2) : http://forum.icst.org.tw/phpbb/viewtopic.php?f=21&t=16411&start=0&sid=866700eee479d130d126967c3160e7f4

Oracle 11g R2 Enterprise (CentOS 5.3 x86_64) 安裝筆記 : http://hans0713.blogspot.com/2009/10/oracle-11g-r2-enterprise-centos-53.html

Oracle 9i Streams 安裝步驟 – http://www.oracle-base.com/articles/9i/Streams9i.php

Oracle 11g Release 2 RAC On Linux Using VMware Server 2 -
http://www.oracle-base.com/articles/11g/OracleDB11gR2RACInstallationOnOEL5UsingVMwareServer2.php

筆記一下網上看到的:

Linux OS 下這些調整 sysctl

fs.file-max = 65535
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65535
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144

http://forum.icst.org.tw/phpbb/viewtopic.php?f=21&t=16411&start=0&sid=866700eee479d130d126967c3160e7f4

2009/11/23

[Great idea!] 10 Minute Mail / 十分鐘電郵

Filed under: Copy_N_Paste, FUN, JOB, Network service — Tags: — 10:18 pm

URL : http://www.10minutemail.com/10MinuteMail/

很多網站要申請加入會員都需要一個 email address , 這個十分鐘電郵就是可以用來作這件事, 收到會員的啟用連結後, 就可以跟這個 email 說再見了!

60f1ce7cabdd8ce41f573a9b25405a1b

2009/11/21

日本的 The Human Race 10K 2009

Filed under: Exercise, FUN — Tags: — 7:02 pm

很 hi
URL : http://inside.nike.com/blogs/nikerunning_news-ja_JP/2009/10/26/-the-human-race-10k-2009-goal-live-

2009/11/20

Get MAC address using C

Filed under: Copy_N_Paste, JOB, Programming/C, System/Linux/Unix* — Tags: — 5:00 pm

不過 , 這邊有指定 eth0 , 若 server 有很多 interface 的話就要注意一下了.

#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>

int main( int argc, char *argv[] )
{
	int s;
	struct ifreq buffer;

	s = socket(PF_INET, SOCK_DGRAM, 0);

	memset(&buffer, 0x00, sizeof(buffer));

	strcpy(buffer.ifr_name, "eth0");

	ioctl(s, SIOCGIFHWADDR, &buffer);

	close(s);

	for( s = 0; s < 6; s++ )
	{
		printf("%.2X ", (unsigned char)buffer.ifr_hwaddr.sa_data[s]);
	}

	printf("\n");

	return 0;
}

2009/11/19

programmer … 超好用的 online tools – URL Encode/URL Decode/base64 encode/base64 decode/UUencode/UUdecode

URL Encode/Decode : http://netzreport.googlepages.com/online_tool_for_url_en_decoding.html

base64 encode/decode : http://www.rbl.jp/base64.php

base64 encode/decode : http://www.motobit.com/util/base64-decoder-encoder.asp

UUencode/decode : http://www.webutils.pl/UUencode

Protected: msg

Filed under: JOB — 8:48 am

This post is password protected. To view it please enter your password below:


2009/11/18

有趣的 ASCII ART

Filed under: FUN, Network service, Software — 2:39 pm

有趣的 ASCII ART : http://www.network-science.de/ascii/
Font: larry3d   Reflection: no   Adjustment: left   Stretch: no      Width: 80     Text: monster

                                   __
                                  /\ \__
  ___ ___     ___     ___     ____\ \ ,_\    __   _ __
/' __` __`\  / __`\ /' _ `\  /',__\\ \ \/  /'__`\/\`'__\
/\ \/\ \/\ \/\ \_\ \/\ \/\ \/\__, `\\ \ \_/\  __/\ \ \/
\ \_\ \_\ \_\ \____/\ \_\ \_\/\____/ \ \__\ \____\\ \_\
 \/_/\/_/\/_/\/___/  \/_/\/_/\/___/   \/__/\/____/ \/_/ 
下頁»

www.monster.com.tw , © Copyright 2008