2011年6月9日 星期四

homebrew uninstallation commands on mac OSX


cd `brew --prefix`
rm -rf Cellar
brew prune
rm -rf Library .git .gitignore bin/brew README.md share/man/man1/brew
rm -rf ~/Library/Caches/Homebrew

2011年6月8日 星期三

Git Newbie command

Global setup:

Download and install Git
  git config --global user.name "Your Name"
  git config --global user.email losehole@gmail.com
        

Next steps:

mkdir test
  cd test
  git init
  touch README
  git add README
  git commit -m 'first commit'
  git remote add origin git@github.com:YOURNAME/test.git
  git push -u origin master
      

Existing Git Repo?

cd existing_git_repo
  git remote add origin git@github.com:YOURNAME/test.git
  git push -u origin master
      

Add and Commit your new file

    git add NEWFILENAME
git commit -m 'NEW commit'  
    git push -u origin master

Gravatar- an avatar in your web account management


Maybe after the Avatar fever, the Gravatar is an avatar that can use the one avatar to log in or sign up different website service.

2011年6月3日 星期五


What is lxml?
lxml is a python tool that can process XML and HTML.
For the reason that I need to use the XMLRPC function, I use the lxml to process 
the requests and responses to call server function and feedback message.   
There are lazy script here:

#sudo port install libxml2 libxslt
#export PATH=/opt/local/bin:$PATH
#export CFLAGS='-flat_namespace'
#sudo easy_install lxml

2011年5月23日 星期一

Ubuntu install ganglia easy steps

At first, you need to build a LAMP architecture in your ubuntu server.

Luckily, we can easy install LAMP step by step and click option when the

Ubuntu installation.  LAMP = Linux Apache MySQL PHP


#sudo apt-get install ganglia-monitor ganglia-webfrontend
#sudo service gmetad start
#sudo service ganglia-monitor start


#sudo ln -s /usr/share/ganglia-webfrontend/ /var/www/ganglia


or


#sudo mv /usr/share/ganglia-webfrontend/ /var/www/ganglia

open browser and type URL   YOURIPorDOMAIN/ganglia


It work~!

2011年5月19日 星期四

GCC Using command

gcc is a GNU project compiler, and you can see it on many Unix like system.

I'll note some using way.

#gcc -O foo.c -o bar.out
#./bar.out

Compile a C program file to a execution file.

-O -> Optimization parameter

-O3 -O2 -O1 -O0    -> 0 do not optimize, 3 is best optimization.


#gcc -Wall -g foo.c -o bar.out

-Wall  -> displayed the warning message  
-g  -> Using gdb debugging and show error message

#gcc -I/usr/include -L/usr/lib -lm test.c -o test 

-Idir_name -> find the header file in directory
-Ldir_name -> find the linrary file in directory
-llibfile_name -> join a library file "libm.so" overpass lib & .so


2011年5月2日 星期一

Mac homebrew git & Aptana Studio 3.0 ruble installation

# ruby -e "$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)"


install Xcode

# brew install git


# cd /Users/losehole/Documents/Aptana Rubles
# git clone git://github.com/aptana/YOURPACK.ruble.git


YUI javascript library support: Drop the SDOCML file into your Web Project.
 
創用 CC 授權條款