• Google used to recommend putting it just before the < /body> tag, but there is some loading problem of the js.

    ###before head
    Current recommendation is just before the < /head> tag.
    < head> will add a little latency; in the footer will reduce the number of pageviews recorded at some small margin.
    As a matter of personal preference, I like to include it in the < head>, but its really a matter of preference.

  • Does Project Management Professional (PMP) worth to take?

    ####Does PMP still worth to take?

    quote” Project Management Professional (PMP®) certification has been ranked the number 1 certification and is globally acknowledged as a standard for demonstrating your experience, education and ability to lead complex projects as project managers. It also helps you get a better salary.”

    I believe the answer is it depends.
    Government and big organization works often require PMP certification, some biochemical/pharmaceutical companies as well.
    In general IT , software developments generally don’t care about project management. Many don’t even have project management position in their company. In client side, manage vendor project probably requires PMP.

    But there is no shortcut to success, PMP will not get you a project manager job.

  • ####Setup scala in linux and Hello World
    it is so simple!

    1. download scala from official website
    2. unzip it: tar xvzf scala-2.10.3.tgz
    3. create SCALA_HOME
    export SCALA_HOME=~/projects/scala/scala-2.10.3/

    add it to path
    export PATH=$PATH:$SCALA_HOME/bin

    4. create hello world
    vi HelloWorld.scala


    object HelloWorld {
    def main(args: Array[String]) {
    println("Hello, world!")
    }
    }

    5. compile
    scalac HelloWorld.scala
    6. run
    scala HelloWorld

    ####what do we get from scala?
    simplicity, consistency and power.

  • Here is some very interesting and competent suggestions

    https://news.ycombinator.com/item?id=6706402

  • ### Overview #
    setup cluster ORACLE UCM 11.1.1.5
    setup Oracle HTTP Server
    one cluster for contribution
    and one cluster for consumption

    four servers:
    contribution:
    UCM_cluster_host1
    UCM_cluster_host2

    consumption:
    UCM_clusterC_host1
    UCM_clusterC_host2

    shared storage:
    /wcmprod1 mounted to UCM_cluster_host1 and UCM_cluster_host2
    /wcmprod2 mounted to UCM_clusterC_host1 and UCM_clusterC_host1

    ### Configuraing the Oracle Database #
    #####schema: cluster_ocs/clusterc_ocs

    #####download rcu version: 11.1.1.5
    #####unzip rcu to /usr/local/rcu/rcuHome/

    #####run bin/rcu as root

    Host Name
    Port
    Service Name
    username
    password
    role: Normal

    ### Installing and configuring UCM hosts
    #####nstall jdk and jrocket @root
    to do install jdk : download jdk-7u45-linux-x64.gz copy to server
    cp jdk binaries to /usr/local/java
    install jrocket to /usr/local/java

    ##### create Middleware folder
    mkdir Middleware
    chown weblogic:weblogic Middleware
    Oracle Middleware home: /usr/local/Oracle/Middleware

    ##### Install weblogic server @weblogic
    ######run for 64 bit weblogic
    /usr/local/java/jdk1.7.0_45/bin/java -d64 -jar wls1035_generic.jar
    /local/home/weblogic/jdk1.7.0_45/bin/java -d64 -jar wls1035_generic.jar

    #####install ecm – inside Disk1 folder @weblogic
    ./runInstaller -jreLoc /local/home/weblogic/jdk1.7.0_45

    select oracle inventory location
    /usr/local/Oracle/Middleware/oraInventory

    #####Next and finish

    ### Create a High Availability Domain ( both contribution and consumption included) #

    #####create a new weblogic domain @weblogic
    ECM_HOME/common/bin/config.sh

    Select Domain Source
    select ‘Oracle Universal Content Management – Content Server – 11.1.1.0’ (this will automatically select more options)
    domain name : cluster_domain/clusterc_domain
    select ‘production mode’
    WITH JDK: /usr/local/java/jrockit-jdk1.6.0_45-R28.2.7-4.1.0

    #####Configure JDBC Component Schema
    select ‘UCM Schema’ and change the following values:
    Schema Owner:
    Schema Password:
    DBMS/Service:
    Host Name:
    Port:
    click ‘Next’

    #####Optional Configuration
    select: admin server
    managed servers, clusters and machines
    deployments and services

    #####create admin server
    port: 7001

    #####create managed server
    listen to 16200
    UCM_server1
    UCM_server2

    UCM_serverC1
    UCM_serverC2

    #####create cluster
    UCM_cluster – unicast

    UCM_clusterC – unicast

    #####Assign Servers to Cluster
    UCM_cluster
    UCM_server1
    UCM_server2

    UCM_clusterC
    UCM_serverC1
    UCM_serverC2

    #####Configure Machines:
    UCM_cluster_host1 5556
    UCM_cluster_host2 5556

    UCM_clusterC_host1 5556
    UCM_clusterC_host2 5556

    #####Assign servers to machines:
    UCM_cluster_host1
    AdminServer
    UCM_server1
    UCM_cluster_host2
    UCM_server2

    UCM_clusterC_host1
    AdminServer
    UCM_serverC1
    UCM_clusterC_host1
    UCM_serverC2

    #####create button

    ### Start the Administration Server and the Managed Servers on ECMHOST1 #
    #####boot.properties
    add/usr/local/Oracle/Middleware/user_projects/domains/cluster_domain/servers/AdminServer/security/boot.properties
    username=weblogic
    password=welcome1

    ./startWeblogic &

    ##### setup node manager – MW_HOME/oracle_common/common/bin/setNMProps.sh
    /usr/local/Oracle/Middleware/oracle_common/common/bin/setNMProps.sh

    ### start Node Manager MW_HOME/wlserver 10.3/server/bin/startNodeManager.sh
    /usr/local/Oracle/Middleware/wlserver_10.3/server/bin/startNodeManager.sh

    #####start UCM serverC1 from console

    ###disable host name verification

    In Oracle WebLogic Server Administration Console, select Servers, and then AdminServer.

    Select SSL, and then Advanced.

    In the Change Center, click Lock & Edit.

    When prompted, save the changes and activate them.

    Set Hostname Verification to None.

    Select Admin Server, SSL, and then Advanced.

    Set Hostname Verification to None.

    Repeat Steps 6 and 7 for ucm server 1 and ucm server 2.

    Restart the AdminServers and all the Managed Servers

    ##### config UCM server 1/UCM serverC1
    http://UCM_cluster_host1:16200/cs

    Content Server Instance Folder: /wcmprod1/ucm/cs

    Native File Repository Location: /wcmprod1/ucm/cs/vault

    Web Layout Folder: /wcmprod1/ucm/cs/weblayout

    Server Socket: Port 4444

    ### Installing and Configuring ECMHOST2 #

    #####same as for ECMHOST1
    #####install weblogic
    #####install ecm
    #####pack and unpack domain – shutdown servers before packing
    #####Pack utility – Oracle_ECM1/common/bin/pack.sh
    #####stop admin server and ucm server 1
    ./pack.sh -managed=true -domain=/usr/local/Oracle/Middleware/user_projects/domains/cluster_domain -template=ecm_template.jar -template_name=”ecm_cluster
    ./pack.sh -managed=true -domain=/usr/local/Oracle/Middleware/user_projects/domains/clusterc_domain -template=ecm_template.jar -template_name=”ecm_cluster

    #####After copying the ecm_template.jar file to ECMHOST2, execute the unpack command on ECMHOST2:

    ./unpack -domain=/u01/app/oracle/product/WLS/11G/user_projects/domains/ecmdomain -template=ecm_template.jar
    ./unpack.sh -domain=/usr/local/Oracle/Middleware/user_projects/domains/cluster_domain -template=ecm_template.jar

    ###Start Node Manager and the WLS_UCM2 Server on ECMHOST2
    Setup nodeManager and then start it:
    ** You may get an error if this has been run previously – that’s ok.
    /oracle_common/common/bin/setNMProps.sh

    –> output if newly run: “File nodemanager.properties not found. Copying required properties file.”
    –> output if already run: “Required properties already set. File nodemanager.properties not modified.”

    Start nodeManager:
    /fmw/wlserver_10.3/server/bin/startNodeManager.sh

    –> output: INFO: Secure socket listener started on port 5556

    #####start weblogic admin and ucm servers

    ### setup Oracle Http server for the IFP cluster #
    #####download oracle web tier
    #####check port availability
    netstat -an | grep “8888”
    Copy the staticports.ini file from the Disk1/stage/Response directory to a temporary directory.
    uncomment
    #####The port for Oracle HTTP server
    Oracle HTTP Server port = 8888

    #####run installer – ./runInstaller

    #####connect with existing domain
    Domain Host Name: UCM_cluster_host1
    Domain Port No: 7001
    User Name: weblogic
    Password: welcome1

    #####next and finish

    ##### config OHS
    After installing Oracle HTTP Server on WEBHOST1, add the following lines to the OHS_HOME/instances/ohs_instance1/config/OHS/ohs1/mod_wl_ohs.conf file:
    WebLogicCluster ecmhost1:16200,ecmhost2:16200
    SetHandler weblogic-handler
    WLCookieName JSESSIONID
    WebLogicCluster ecmhost1:16200,ecmhost2:16200
    SetHandler weblogic-handler
    WLCookieName JSESSIONID

     

    #####restart OHS
    ./opmnctl restartproc process-type=OHS

    #####test
    http://WEBHOST1:8888/cs

  • To install svn command line client on Mac OSx :

    1. Install xCode, svn tool comes with xcode.
    2. set svn to classpath: export PATH=/Applications/xcode/Contents/Developer/usr/bins:PATH

    3. After installation is finished, you can open the terminal and run svn –version to view that svn is intalled.

  • Since SAML is an open standard, you do not face vendor locking when using it for SSO. Simply put, with SAML, a user can login to one system in an environment, and then will be able access to other systems in that environment without needing to login again (until the web browser session is ended).

    User access the Service Provider with SAML secured application

    1. The SP sends a request to a pre-registered IdP for authentication. ‘samlp’ is the SAML 2.0 protocol namespace, ‘urn:oasis:names:tc:SAML:2.0:protocol’
    2. If user is not authenticated yet, IdP interacts with user to authenticate him/her
    3. IdP sends a response to SP with the token for the user

     

    So, let’s take a look at what happens when someone wants to log in at a Service Provider (SP) that uses federated authentication for one of its customers (the IDP). For the sake of example, let’s say the SP is Google Apps and the IDP is an organisation called My University, where Alice is a student. The flow of SAML protocol messages can be illustrated in a diagram as follows:

     

    Ref:https://www.oasis-open.org/committees/download.php/27819/

  • – open file vertically
    vim -O file1 file2
    – horizontally
    vim -o file1 file2

    – open one file in vim, then split for the second file horizontally
    :new file2
    or
    :sp file2
    – vertifically
    :vsp file2

    – horizontally
    ctrl + wv and :e file2
    – vertically
    ctrl + ws and :e file2

  • 梁文道的节目纪录。

    很不错的书籍介绍

  • Somehow, i found myself only focusing on reading while riding mrt…..