HanG321 Blog
Be Shine, Be Smile, Be Wild
  • Home
  • Blog
    • 好文閱讀 readings
    • 生活記事 diary
    • 時事評論 commentary
    • 科技資訊 technology
    • 電腦編程 programming
    • 金融財經 finance
    • 音樂電影 music/movie
  • About

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

 

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

車尾燈保險絲

June 5, 2015|生活記事

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

 

http://www.agcoauto.com/content/news/p2_articleid/243
http://www.agcoauto.com/content/news/p2_articleid/245

...9101112...40...

 

如果你喜歡我的文章,請幫忙按 1-10次 LikeButton 化讚為賞,非常感謝!越喜歡當然可以越按越多 😛

搜尋 Search

簡介 Bio

香港人,現居南十字星空下。

為人貪心,科技、生活、財經、散文 皆有興趣,周身刀冇張利。

思想矛盾,喜歡現在work-life balance 既生活又懷念a city never sleep。

 

每月送我一杯咖啡支持我: liker.land/hang321




分類 Categories

  • 好文閱讀
  • 時事評論
  • 未分類
  • 生活記事
  • 科技資訊
  • 金融財經
  • 電腦編程
  • 音樂電影

文章存檔 Archives




熱門文章 Popular Posts

  • Install XPEnology (DSM) 5.1 on ESXi 6 (HP MicroServer Gen 8)
    Install XPEnology (DSM) 5.1 on ESXi 6 (HP MicroServer Gen 8) June 8, 2015
  • 呢幾日個blogger 有問題….
    呢幾日個blogger 有問題…. October 28, 2004
  • assembly
    assembly February 11, 2006
  • 新工作
    新工作 January 6, 2009
  • 嫁人要嫁工程師
    嫁人要嫁工程師 April 27, 2006

標籤雲 Tag Cloud

CentOS Character chroot Cluster crash cryptography DD-WRT debug Domino DSM Dual Core DWA email ESXi GCP git google HylaFax IE Java Javascript JRE LikeCoin Linux log LotusScript mint MX MySQL nginx PKI PowerShell Qwiklabs srt telent VMware vpn vSphere WinXP wordpress XPEnology 專欄 網絡資訊 選股 風帆

日曆 Calendar

May 2025
M T W T F S S
  « Feb    
 1234
567891011
12131415161718
19202122232425
262728293031  

Follow Me

Follow Us on RSSFollow Us on TwitterFollow Us on YouTube

文章存檔 Archives

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