Posts

Showing posts from August, 2014

[Level 1] git ignore

If you want git not to commit some temporary files or log files...etc., you could create .gitignore file to ignore them. If you don't have any idea about which file should be ignore, you could also download ignore templates that prepared by github. mkdir ~/git-home cd ~/git-home git init git clone https://github.com/github/gitignore cd ~/my_py_project cp ~/git-home/gitignore/Python.gitignore ./.gitignore Wish this helps. regards, Stanley Huang

[Level 1] HOWTO Installing Packages from Yaourt AUR in Archlinux.

If you want to install packages from Yaourt(Yet AnOther User Repository Tool ) AUR(Archlinux User Repository), you could follow the following steps. a. Install yaourt by downloading source code. 1. Install development environment. $ sudo pacman -S base-devel $ sudo pacman -S yajl 2. Download, build and install package-query $ curl -O https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gz $ tar zxvf ./package-query.tar.gz $ cd ./package-query $ makepkg -si 3. Download, build and install Yaourt $ wget https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz $ tar zxvf ./yaourt.tar.gz $ cd ./yaourt $ makepkg -si b. Install yaourt from repository. 1. setup repository $ sudo su # cat >> /etc/pacman.conf <<EOF [archlinuxfr] SigLevel = Never Server = http://repo.archlinux.fr/$arch EOF 2. update repository and install yaourt # pacman -Syu # pacman -Ss yaourt Wish this helps. regards, Stanley Huang

[Level 1] Create git repository by command.

A script for creating git repository quickly. http://viget.com/extend/create-a-github-repo-from-the-command-line Wish this helps. regards, Stanley Huang

[ Level 1 ] Go installation and "Hello World" sample.

A friend of mine told me, if you could choose the programming language, choose the fashion one. I tried to use Go becuase it's "Go fashion"(Chinglish, means, fashion enough). The following script is the way to install Go in CentOS, you could refer to it if you also used CentOS. #!/bin/bash # install Go, gcc for Go rpm -q golang >/dev/null 2>&1 || sudo yum -y install golang libgo gcc-go # Hello World [ -e ./HelloWorld.go ] || cat > ./HelloWorld.go <<EOF package main import "fmt" func main() { fmt.Println("Hellow World!") } EOF # run as interpreter script go run ./HelloWorld.go # compile script and run it. gccgo -g -o ./HelloWorld.out ./HelloWorld.go && ./HelloWorld.out Wish this helps. regards, Stanley Huang

[ Level 1 ] Tips for sublime text.

Good tips for sublime. http://nipunbatra.wordpress.com/2014/01/30/plugins-for-python-development-in-sublime-text/ Wish this helps. regards, Stanley Huang