Posts

[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

[Level 1] Install skype in CentOS 7.

If you want to install skype in CentOS 7. You need to download 32 bit library. Or you could lookup nux-desktop and it already has made for 32 bit libraries that required by skype. sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm; sudo yum localinstall http://download.skype.com/linux/skype-4.3.0.37-fedora.i586.rpm; Wish this helps. regards, Stanley Huang

[Level 1] How to install 32 bit java for Juniper VPN in CentOS.

## ## Precondition: you have to download 32 bit openjdk first! ## compat_32="compat-libstdc++-296" libs_for_vpn="xterm ld-linux.so.2 libstdc++.so.6 libz.so.1 libXext.so.6 libXrender.so.1" java_64_rpms="java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64 icedtea-web-1.4.1-0.el6.x86_64" libs_for_java_32="giflib.i686 nss.i686 libpng12.so.0 libpulse.so.0 rhino" java_32_rpm_url="ftp://ftp.muug.mb.ca/mirror/centos/6.5/os/i386/Packages/java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.i686.rpm" java_32_rpm="`basename $java_32_rpm_url`" download_dir="/tmp" ## download 32bit java cd $download_dir; wget $java_32_rpm_url ## remove native openjdk sudo yum -y remove java-1.7.0-openjdk ## install 32 compatible libraries for app in $compat_32 do sudo yum -y install $app done ## install libraries for vpn for app in $libs_for_vpn do sudo yum -y install $app done ## install 64 bit java for app in $java_64_rpms do sudo yum -y...