HanG321 Blog
Be Shine, Be Smile, Be Wild

JAVA_HOME of OpenJDK 1.7 on CentOS 7

June 7, 2015|CentOS, Java|科技資訊, 電腦編程

當設定 Jenkins 時發現沒有JAVA_HOME, 正奇怪明明已經安裝了Open JDK 7. 原來未安裝devel packages. yum install java-1.7.0-openjdk-devel -y 然後加上java.sh 到  /etc/profile.d

java.sh
Shell
1
2
[ -z "$JAVA_HOME" ] && JAVA_HOME="/usr/lib/jvm/java"
export JAVA_HOME

  Maven: link from https://maven.apache.org/download.cgi

Shell
1
2
3
4
5
6
7
8
wget http://apache.mirror.digitalpacific.com.au/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
tar zxvf apache-maven-3.3.3-bin.tar.gz -C /usr/local
ln -s /usr/local/apache-maven-3.3.3 /usr/local/maven
vim /etc/profile.d/maven.sh
#add following lines to maven.sh
export M2_HOME=/usr/local/maven
export M2=$M2_HOME/bin
PATH=$M2:$PATH

  Ant: links from https://ant.apache.org/bindownload.cgi

Shell
1
2
3
4
5
6
7
wget http://mirror.ventraip.net.au/apache//ant/binaries/apache-ant-1.9.5-bin.tar.gz
tar zxvf apache-ant-1.9.5-bin.tar.gz -C /usr/local
ln -s /usr/local/apache-ant-1.9.5 /usr/local/ant
vim /etc/profile.d/ant.sh
# add following line to ant.sh
ANT_HOME=/usr/local/ant
PATH=$PATH:$ANT_HOME/bin

 

Read more »

Telstra SMS API, python and git

June 6, 2015|API, DSM, git, python|電腦編程

Yesterday I read about Telstra provides their SMS API for 1000 SMS free per month, so today I spent some time to play with it. One of the use case is Synology DSM to send alert notification if any warning message happened. Well, installing the DS Finder app would be easier, but hey, just wanna try something out. Telstra API already provided their shellscript version in their API doc, and somebody have been developed on php/powershell/node.js. Since DSM native support python, I chose it and remind me my last python programming is 10 yeasrs ago in uni. python script is easy to implement in couple of hours, yet the shellscript to init was quite troublesome. At the end, I created my first open source project. Check out https://github.com/hang321/synology-telstra-sms and Telstra API for details.   other implementation: powershell: http://pastebin.com/nmE5847n node.js: https://github.com/mzbac/sms ruby: https://github.com/hexinpeter/AnonymousSMS

Read more »

車尾燈保險絲

June 5, 2015|生活記事

話說幾個月前, 我揸車停係紅綠燈時, 後面個司機機拍我車窗話我架車剎車燈唔著, 她差點撞上我. 放工後到汽車舖買燈換, 依然唔著. 再上網查, 先知原來仲有保險絲係軚盤下. 拿fog light 那個fuse 頂住先.   http://www.agcoauto.com/content/news/p2_articleid/243 http://www.agcoauto.com/content/news/p2_articleid/245

Read more »
...9101112...40...

搜尋 Search

Copyright © 2004-2021 hang321.net. All Rights Reserved