2014/12/11

Linux 下使用終端機連接 switch (minicom)

RS232 是很多資訊設備仍保留的連接界面,最常用在網路設備上的  console 界面登入。
minicom 是一個 Linux 下可以以終端機模式登入的程式,和以前 dos 時代的鐵力士很相


# 安裝 minicom
mtchang@debian:~$ sudo apt-get install minicom

# 我用的是 usb to rsr232 界面(現在 rs232 port 越來越少見了),藉由 messages 檔案觀看他自動賦予那個 device 編號。這裡抓到的是 ttyUSB0 --> /dev/ttyUSB0
mtchang@debian:~$ sudo tail /var/log/messages -f
Dec 11 09:54:34 debian kernel: [ 3454.792199] usb 5-1: USB disconnect, device number 2
Dec 11 10:32:35 debian kernel: [ 5735.764149] usb 4-1: new full-speed USB device number 4 using uhci_hcd
Dec 11 10:32:35 debian kernel: [ 5735.980153] usb 4-1: New USB device found, idVendor=5372, idProduct=2303
Dec 11 10:32:35 debian kernel: [ 5735.980162] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec 11 10:32:35 debian kernel: [ 5735.980170] usb 4-1: Product: USB-Serial Controller
Dec 11 10:32:35 debian kernel: [ 5735.980175] usb 4-1: Manufacturer: Prolific Technology Inc.
Dec 11 10:32:35 debian kernel: [ 5735.982272] pl2303 4-1:1.0: pl2303 converter detected
Dec 11 10:32:35 debian kernel: [ 5735.994354] usb 4-1: pl2303 converter now attached to ttyUSB0
Dec 11 10:32:35 debian mtp-probe: checking bus 4, device 4: "/sys/devices/pci0000:00/0000:00:1a.1/usb4/4-1"
Dec 11 10:32:35 debian mtp-probe: bus: 4, device: 4 was not an MTP device

mtchang@debian:~$ minicom --help
Usage: minicom [OPTION]... [configuration]
A terminal program for Linux and other unix-like systems.

  -b, --baudrate         : set baudrate (ignore the value from config)
  -D, --device           : set device name (ignore the value from config)
  -s, --setup            : enter setup mode
  -o, --noinit           : do not initialize modem & lockfiles at startup
  -m, --metakey          : use meta or alt key for commands
  -M, --metakey8         : use 8bit meta key for commands
  -l, --ansi             : literal; assume screen uses non IBM-PC character set
  -L, --iso              : don't assume screen uses ISO8859
  -w, --wrap             : Linewrap on
  -z, --statline         : try to use terminal's status line
  -7, --7bit             : force 7bit mode
  -8, --8bit             : force 8bit mode
  -c, --color=on/off     : ANSI style color usage on or off
  -a, --attrib=on/off    : use reverse or highlight attributes on or off
  -t, --term=TERM        : override TERM environment variable
  -S, --script=SCRIPT    : run SCRIPT at startup
  -d, --dial=ENTRY       : dial ENTRY from the dialing directory
  -p, --ptty=TTYP        : connect to pseudo terminal
  -C, --capturefile=FILE : start capturing to FILE
  -T, --disabletime      : disable display of online time
  -v, --version          : output version information and exit
  configuration          : configuration file to use

These options can also be specified in the MINICOM environment variable.
This variable is currently unset.
The configuration directory for the access file and the configurations
is compiled to /etc/minicom.

Report bugs to <minicom-devel@lists.alioth.debian.org>.


# 第一次先設定一下連接資訊,畫面如下:
mtchang@debian:~$ sudo minicom -s



# 觀看 default 設定檔
mtchang@debian:~$ cat /etc/minicom/minirc.dfl
# Machine-generated file - use "minicom -s" to change parameters.
pu port             /dev/ttyUSB0
pu baudrate         9600
pu mautobaud        Yes
pu rtscts           No


# 登入系統,以 root 權限啟動 minicom 就可以登入了。
mtchang@debian:~$ sudo minicom




2014/11/03

AutoCAD 2D 入門課程(2014)


2D CAD 入門課程 影音頻道: http://goo.gl/nelCFq

上課講義電子檔
共計 5 次,每次 3HR ,時間及講義如下:

DAY 1 線上觀看講義(1)
DAY 2 線上觀看講義(2)
DAY 3 線上觀看講義(2)
DAY 4 線上觀看講義(3)
DAY 5 線上觀看講義(4) 

部份資料由網路上取得,或許有未能標註來源出處的地方請不吝告知。

2014/10/31

正規表示式 Regexper 及測試使用的小工具


講到 RE 首先推薦這個網站,由 osteele 作者開發的小工具,可以方便的針對程式中使用的正規表示式先行測試,最後還附上使用語法的頁面。

以檢測是否為網卡卡號的表示式為範例:

[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}

http://osteele.com/tools/rework/



另外一各式把正規表示式畫成一個圖,看起來比較容易理解。
http://www.regexper.com/

底下為使用 REGERPER 網站顯示的圖形說明



在 Linux 下可以使用 grep -E 來使用進階的正規表示試驗正,如果使用 grep -e 的話只是用一般型態的正規表示式。地下為 ifconfig 指令找到該指令中 MAC address 位置的正規表示式。




常見的正規表示式
1. 驗證是否為一個合法的日期字串 ex: 2014-10-31

/^(\d{2}(([02468][048])|([13579][26]))\-((((0[13578])|(1[02]))\-((0[1-9])|([1-2][0-9])|(3[01])))|(((0[469])|(11))\-((0[1-9])|([1-2][0-9])|(30)))|(02\-((0[1-9])|([1-2][0-9])))))|(\d{2}(([02468][1235679])|([13579][01345789]))\-((((0[13578])|(1[02]))\-((0[1-9])|([1-2][0-9])|(3[01])))|(((0[469])|(11))\-((0[1-9])|([1-2][0-9])|(30)))|(02\-((0[1-9])|(1[0-9])|(2[0-8])))))$/

2. Email 簡單的正規表示式
/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/

3. ftp http https 網址
/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/

4. 信用卡
credit_card : /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/

5. RFC 完整的 email 檢查程式,但這已經不只是正規表示式了。
http://dzone.com/snippets/rfc-compliant-email-address





2014/10/30

webmaster 小工具

這個網站,提供一些網頁的小工具
http://www.phpjunkyard.com/

查詢某個 ip 的 whois 資訊
http://www.phpjunkyard.com/tools/ip-whois.php

將文字轉換成為 html ,避免掉奇怪的程式碼
http://www.phpjunkyard.com/tools/text-to-html.php 

將 html 去除成為純文字
http://www.phpjunkyard.com/tools/html-to-text.php

觀看 html 的 head 資訊
http://www.phpjunkyard.com/tools/view-http-header.php

亂碼產生器可以產生自己也會往記的密碼
http://www.phpjunkyard.com/tools/random-string.php




phpmailer 發信程式範例(smtp 不用認證)


PHPmailer 是個很好用的發信工具, https://github.com/PHPMailer/PHPMailer (原始碼) 目前在 linux 的套件也都有收錄這套。

如果要安裝直接安裝   libphp-phpmailer  就可以(ubuntu , linux mint 都有收錄)
mtchang@mt ~ $ sudo apt-cache search phpMailer
libphp-phpmailer - full featured email transfer class for PHP
mtchang@mt ~ $ sudo apt-get install libphp-phpmailer

安裝好後他會放在 /usr/share/php/libphp-phpmailer 目錄內
如果程式中需要引用的話,可以透過
require_once "/usr/share/php/libphp-phpmailer/class.phpmailer.php";
的方式引用

底下為 phpmailer 引用的程式碼範例,並針對中文部份有使用 mb_internal_encoding('UTF-8'); 及 mb_encode_mimeheader("$name","UTF-8")); 避免中文的亂碼產生。

// 程式開始  ------------------------------------------------------------------------------------------------------
<?php
// phpmailer 發信函式庫
require_once "/usr/share/php/libphp-phpmailer/class.phpmailer.php";

// ------------------------------------------------------------------------------------
// 接收上一個網頁傳來的變數
// ------------------------------------------------------------------------------------
$name =$_POST['name'];
$email =$_POST['email'];
$comments =$_POST['comments'];

// ------------------------------------------------------------------------------------
// php mailer 發信
// ------------------------------------------------------------------------------------
$system_email='root@jangmt.com';
date_default_timezone_set('Asia/Taipei');
mb_internal_encoding('UTF-8');
$mail             = new PHPMailer(); // defaults to using php "mail()"
$mail->IsSendmail(); // telling the class to use SendMail transport
// 設定郵件的內文
$body             = eregi_replace("[\]",'',$comments);
// 寄信伺服器,請勿修改位置限制管院內部可以發信
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host       = "smtp.jangmt.com"; // SMTP server
$mail->SMTPDebug  = 0;                     // enables SMTP debug information (for testing)
$mail->SMTPAuth   = false;                  // enable SMTP authentication
// 信件的回信欄位
$mail->AddReplyTo($system_email,mb_encode_mimeheader("系統發信請勿回信","UTF-8"));
// 信件的送件人欄位
$mail->SetFrom($system_email, mb_encode_mimeheader("系統發信請勿回信","UTF-8"));
// 主要收件人
$mail->AddAddress($email, mb_encode_mimeheader("$name","UTF-8"));
// 標題
$mail->Subject    = "Message from $name, internet customer";
$mail->MsgHTML($body);
// 回報執行結果
if(!$mail->Send()) {
  echo "Email Mailer Error: " . $mail->ErrorInfo;
} else {
  echo "Email Message sent! <br>";
}
// ------------------------------------------------------------------------------------
// 網頁顯示提示訊息
// ------------------------------------------------------------------------------------
echo "<html> \n";
echo "<head> \n";
echo "<title> Message from $name, internet customer</title>
\n";
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html;
charset=utf-8\"> \n";
echo "</head> \n\n";
echo "<body> \n";
echo " Thank you for the message, $name.<br> <br> \n";
echo " The information you provide is: <br> \n";
echo " Name: $name <br> \n";
echo " Email: $email <br> \n";
echo " Comments: $comments <br> \n";
echo "</body> </html> \n";


?>
// 程式結束  ------------------------------------------------------------------------------------------------------

底下為搭配上面發信程式的 form 表單,直接拉 CDN 上面的 bootstrap 3.2 來用。

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
<title>顧客回饋單</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

  </head>

  <body>
<!-- REF:  http://getbootstrap.com/css/ -->
    <div class="container">
<div class="page-header">
        <h3>顧客回饋單</h3>
        </div>
<div class="col-lg-6">
<p class="text-info"><strong>親愛的顧客,感謝您本次的消費。請留下您寶貴的意見,促使我們能提供更好的服務,謝謝您~</strong></p>
<form method="post" action="sendpost.php">
<p class="text-info">
您的大名:
<input name="name" type="text" />&nbsp;</td>
</p>
<p class="text-info">
您的email:
<input name="email" type="text" />&nbsp;</td>
</p>
<p class="text-info">
您的意見:
<textarea name="comments" cols="20" rows="2"></textarea>
</p>
<input name="Submit1" type="submit" value="submit" />&nbsp;  <input name="Reset1" type="reset" value="reset" />
</form>
</div>

     <div  class="bg-info">
<p></p>
<p>Company 2014 by mtchang </p>
    </div>

    </div> <!-- /container -->

  </body>
</html>

2014/10/25

類似 bootstrap 前端 UI Frameworks


BootStrap 這個 UI Frameworks 很好用,可以很快速的做出品質不錯的使用者界面。 http://getbootstrap.com/  但用久了發現大家做的都一樣,看不出差異。

於是最近評估了幾個類似的 Fremework ,主要來自於底下兩篇的介紹

10 Best Responsive HTML5 Frameworks http://designinstruct.com/roundups/html5-frameworks/

20 Exceptional CSS Boilerplates and Frameworks http://mashable.com/2013/04/26/css-boilerplates-frameworks/

當然 wiki 上面這篇(http://en.wikipedia.org/wiki/CSS_frameworks) 比較了格點系統的細節比較可以參考看看

另外在這篇主要比較了 bootstrap 及 Foundation 及 Skeleton

我這次選了 Foundation  這個 css frameworks 來使用,因為從他的文件說明( http://foundation.zurb.com/docs/ )看得出 他的 UI 走扁平化的設計,符合時尚的潮流 ios7 Mac OS X 10.10 Yosemite 都用 。 

Foundation button
Foundation button


但是總是感覺怪怪的,這個 button 和 10 多年前 M$ frontpage 的內建 button 很像的感覺。所以應該說 M$ 十多年前就走在設計的前端 .....,只是他的名子不叫 APPLE 。

FrontPage Sample


Linux Mint – LAMP 的安裝 (3) – 讓使用者可以用 public_html 當個人網頁目錄

Linux Mint – LAMP 的安裝 (3) – 讓使用者可以用 public_html 當個人網頁目錄

* 設定讓使用者可以用 public_html 當個人網頁目錄

mtchang@mtchang-virtual-machine /etc/apache2/mods-available $ sudo a2enmod userdir
Enabling module userdir.
To activate the new configuration, you need to run:
  service apache2 restart
mtchang@mtchang-virtual-machine /etc/apache2/mods-available $ sudo service apache2 restart
 * Restarting web server apache2


 * 測試 public_html 驗證否正常工作?

mtchang@mtchang-virtual-machine /etc/apache2/mods-available $ cd ~
mtchang@mtchang-virtual-machine ~ $ ls
vmware-tools-distrib  下載  公共  圖片  影片  文件  桌面  模板  音樂
mtchang@mtchang-virtual-machine ~ $ mkdir public_html
mtchang@mtchang-virtual-machine ~ $ echo 'hello my person home'  > /home/mtchang/public_html/index.html
mtchang@mtchang-virtual-machine ~ $ echo '<?php phpinfo();  ?>'  > /home/mtchang/puublic_html/index.php 

* 請直接使用 http://localhost/~mtchang/index.html 或是 http://localhost/~mtchang/index.php 觀看驗證。

* php 程式會當成文字顯示

mtchang@mtchang-virtual-machine ~ $ cd /etc/apache2/mods-enabled/
mtchang@mtchang-virtual-machine /etc/apache2/mods-enabled $ sudo nano php5.conf 
mtchang@mtchang-virtual-machine /etc/apache2/mods-enabled $ sudo service apache2 restart
# 修改底下最後的部份,將它註解
# Running PHP scripts in user directories is disabled by default
#
# To re-enable PHP in user directories comment the following lines
# (from <ifmodule ...=""> to </ifmodule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
#<ifmodule mod_userdir.c="">
#    <directory home="" *="" public_html="">
#        php_admin_flag engine Off
#    </directory>
#</ifmodule>

mtchang@mtchang-virtual-machine /etc/apache2/mods-enabled $ sudo service apache2 restart
 * Restarting web server apache2

Linux Mint – LAMP 的安裝 (2) -MySQL and phpMyAdmin 的安裝與設定

Linux Mint – LAMP 的安裝 (2) -MySQL and phpMyAdmin 的安裝與設定
MySQL and phpMyAdmin 的安裝與設定

mtchang@mtchang-virtual-machine ~ $ sudo apt-get install mysql-server
正在讀取套件清單... 完成
正在重建相依關係        
正在讀取狀態資料... 完成
下列的額外套件將被安裝:
  libaio1 libdbd-mysql-perl libdbi-perl libmysqlclient18 libterm-readkey-perl
  mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server-5.5
  mysql-server-core-5.5
建議套件:
  libmldbm-perl libnet-daemon-perl libplrpc-perl libsql-statement-perl tinyca
  mailx
推薦套件:
  libhtml-template-perl
下列【新】套件將會被安裝:
  libaio1 libdbd-mysql-perl libdbi-perl libmysqlclient18 libterm-readkey-perl
  mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server
  mysql-server-5.5 mysql-server-core-5.5
升級 0 個,新安裝 11 個,移除 0 個,有 89 個未被升級。
需要下載 8,945 kB 的套件檔。
此操作完成之後,會多佔用 96.3 MB 的磁碟空間。
Do you want to continue? [Y/n] y
...
... (省略了約 1000 行....)
...
設定 libaio1:amd64 (0.3.109-4) ...
設定 libmysqlclient18:amd64 (5.5.38-0ubuntu0.14.04.1) ...
設定 libdbi-perl (1.630-1) ...
設定 libdbd-mysql-perl (4.025-1) ...
設定 libterm-readkey-perl (2.31-1) ...
設定 mysql-client-core-5.5 (5.5.38-0ubuntu0.14.04.1) ...
設定 mysql-client-5.5 (5.5.38-0ubuntu0.14.04.1) ...
設定 mysql-server-core-5.5 (5.5.38-0ubuntu0.14.04.1) ...
設定 mysql-server-5.5 (5.5.38-0ubuntu0.14.04.1) ...
140913 23:10:51 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
mysql start/running, process 15507
Processing triggers for ureadahead (0.100.0-16) ...
設定 mysql-server (5.5.38-0ubuntu0.14.04.1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.1) ...

* 安裝過程會詢問 MySQL 的 root 預設密碼 ,請給予一個預設密碼。

* 重新啟動 mysql server 服務

mtchang@mtchang-virtual-machine ~ $ sudo /etc/init.d/mysql restart
 * Stopping MySQL database server mysqld                                                   [ OK ]
 * Starting MySQL database server mysqld                                                   [ OK ]
 * Checking for tables which need an upgrade, are corrupt or were
not closed cleanly.

* 用 mysql 客戶端工具測試看看, 說明請翻開 mysql –help 的內容說明

mtchang@mtchang-virtual-machine /etc/apache2/conf-available $ mysql -u root -h 127.0.0.1 -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 93
Server version: 5.5.38-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select Host,User,Password  from mysql.user;
+-----------------+------------------+-------------------------------------------+
| Host            | User             | Password                                  |
+-----------------+------------------+-------------------------------------------+
| localhost       | root             | *A7A9FADD822492649C01057FB6ADBBC9D2FD02DE |
| mint.jangmt.com | root             | *A7A9FADD822492649C01057FB6ADBBC9D2FD02DE |
| 127.0.0.1       | root             | *A7A9FADD822492649C01057FB6ADBBC9D2FD02DE |
| ::1             | root             | *A7A9FADD822492649C01057FB6ADBBC9D2FD02DE |
| localhost       | debian-sys-maint | *21703857A0643E7417551DE439160F71ADB5701F |
| mint.jangmt.com | phpmyadmin       | *A7A9FADD822492649C01057FB6ADBBC9D2FD02DE |
+-----------------+------------------+-------------------------------------------+
6 rows in set (0.00 sec)

mysql> \q
Bye

* 安裝 phpmyadmin 網頁版本的管理工具
mtchang@mtchang-virtual-machine ~ $ sudo apt-get install phpmyadmin
正在讀取套件清單... 完成
正在重建相依關係        
正在讀取狀態資料... 完成
下列的額外套件將被安裝:
  dbconfig-common libapache2-mod-php5 libjs-codemirror libjs-jquery
  libjs-jquery-cookie libjs-jquery-event-drag libjs-jquery-metadata
  libjs-jquery-mousewheel libjs-jquery-tablesorter libjs-jquery-ui
  libjs-underscore libmcrypt4 php-gettext php5-common php5-mcrypt php5-mysql
建議套件:
  php-pear libjs-jquery-ui-docs libmcrypt-dev mcrypt php5-user-cache
推薦套件:
  php5-cli javascript-common php5-gd
下列【新】套件將會被安裝:
  dbconfig-common libjs-codemirror libjs-jquery libjs-jquery-cookie
  libjs-jquery-event-drag libjs-jquery-metadata libjs-jquery-mousewheel
  libjs-jquery-tablesorter libjs-jquery-ui libjs-underscore libmcrypt4
  php-gettext php5-mcrypt php5-mysql phpmyadmin
下列套件將會被升級:
  libapache2-mod-php5 php5-common
升級 2 個,新安裝 15 個,移除 0 個,有 87 個未被升級。
需要下載 8,379 kB 的套件檔。
此操作完成之後,會多佔用 29.0 MB 的磁碟空間。

* 過程中會問題這個工具和那個 web service 搭配,有兩種選項 apache2 及 lighttpd 兩個。我們當然要選 apache2 這個服務。

* 再來會問 phpmyadmin 和資料庫的設定問題 「Configure database for phpmyadmin with dbconfig-common?」,請一定要回答這些問題,否則無法啟動使用 phpmyadmin 。

* 裝好後你可以使用 http://localhost/phpmyadmin 登入系統也可以用 ip 遠端登入,但是在 ubuntu 及 centos 等系統則沒法從其他機器登入。

* 使用 http://localhost/phpmyadmin/ 登入系統測試

Linux Mint – LAMP 的安裝 (1)



* Apache的管理與設定更是成了初學 Linux 的使用者必須一定要學會的技術。本文說明的主要環境以 Linux Mint,配合 Apache2 Server 網頁服務、PHP 程式語言、MySQL資料庫(更改為 MariaDB) 及 PHPMyAdmin資料庫管理工具,架設出完整的LAMP服務的架設流程。


* 需求套件:再進行LAMP服務的安裝時,我們需要以下開放原始碼的程式。他的官方網站如下:

  • Apache(http://httpd.apache.org/)
  • PHP(http://www.php.net/)
  • MySQL(http://www.mysql.com/) --> 轉 https://mariadb.org/
  • PHPMyAdmin(http://www.phpmyadmin.net)

這些程式是他的官方網站資料,在 Linux Mint OS 中已經有提供LAMP已經編譯好的套件程式,只需要透過 apt-get 的軟體安裝即可方便的安裝完成。

安裝之前
1. 設定好你的網路及網路名稱
sudo /etc/init.d/networking restart  可以重新啟動你的網卡
ifconfig  可以查詢你的網卡資訊
mtchang@machine ~ $ sudo nano /etc/hosts
127.0.0.1 localhost
127.0.0.1 mtchang-virtual-machine
127.0.0.1 mini.jangmt.com
192.168.189.129 mint.jangmt.com

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

* 查詢網卡資訊 ifconfig
mtchang@machine ~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0c:29:a4:23:2d  
          inet addr:192.168.189.129  Bcast:192.168.189.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fea4:232d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:990 errors:0 dropped:0 overruns:0 frame:0
          TX packets:936 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:93782 (93.7 KB)  TX bytes:122551 (122.5 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:207 errors:0 dropped:0 overruns:0 frame:0
          TX packets:207 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:29195 (29.1 KB)  TX bytes:29195 (29.1 KB)

* 啟動 apache 的服務
mtchang@machine ~ $ sudo /etc/init.d/apache2 restart
 * Restarting web server apache2                            [ OK ] 
* 接下來用瀏覽器測試
http://localhost/index.php 應該會有 linux 的測試畫面出現。(localhost 只能在本機用,如果試用別機器測試請輸入他的 ip )


* 再 建立 php 的測試檔案, /var/www/html 目錄為 apache2 的家目錄
mtchang@machine /var/www/html $ sudo nano /var/www/html/index.php
<?php 
echo "hello linux";
phpinfo(); 
?>

到這裡 apache2 及 php 可算是可以工作了。

電腦端立院 IVOD GUI 下載器 (win portable)

電腦端立院 IVOD GUI 下載器 (win portable)


我依據這篇 https://g0v.hackpad.com/IVOD-KdTs5gZb3yw 的程式碼及概念

用 PHP 改寫了一個 protable 版本可以在 windows 7 64bit 運作的

圖形界面下載器,他是用 php web 服務做的本機端下載程式。


---- 2014.10.4 更新 ----

找到一個 phpdesktop 的工具,把php 打包起來,看起來更像是一個桌面程式了。http://code.google.com/p/phpdesktop/

另外修正一些小 bug ,重新打包釋出 ivod v0.3 版本。請解開後執行 run.exe 就可以開始抓了。

另外推薦最近熱門影片:範例網址(2):http://ivod.ly.gov.tw/Play/VOD/76446/300K (韓國已發展8G,台灣現在才推動4G是否太落伍?04:21秒起) 看新聞不清楚拉,直接看最了解為何 IT 人員會崩潰的原因,且可以作為資訊教育的案例宣導。

--------


使用方式:

(1) 下載這個檔案,完成後在你的電腦解開這個程式。


* 0.3版下載(2014.10.5 update) --> 解開後執行 run.exe 就可以了。

* 0.2 版下載 (2014.9.27 update)


這一版加入了中文檔名命名、改善啟動流程、跑起來更順了.....


(2) 找到目錄中的 run.bat 檔案執行它,它會啟動 php web 服務。並且帶出瀏覽器引導你進入 http://localhost:8000/ 。






(3) 去立法院的 IVOD 選各想要下載的網址






(4) 丟到你本機的下載器內,它會先檢查一下內容,並引導你下載它。





我的環境是 win7 64bit eng. 目前測試用 chrome 和 firefox 最新版下載沒有問題。如有問題,請留言告訴我巴。












謝謝。

2014/10/14

Vulnerability Scanning Tools(漏洞掃描工具)

https://www.owasp.org/index.php/Category:Vulnerability_Scanning_Tools
寫得很清楚

但 OpenSource 就只有幾個


  1. http://rgaucher.info/beta/grabber/
  2. http://sourceforge.net/p/grendel/code/ci/c59780bfd41bdf34cc13b27bc3ce694fd3cb7456/tree/
  3. http://www.cirt.net/nikto2
  4. https://subgraph.com/vega/
  5. http://wapiti.sourceforge.net/
  6. http://www.sensepost.com/research/wikto/
  7. https://www.owasp.org/index.php/OWASP_Xenotix_XSS_Exploit_Framework
  8. https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project


先推薦兩個:
1. vega
https://subgraph.com/vega/ 跨平台,用 java 寫的,圖形化界面。



補充一個,無線網路偵測的
https://www.fern-pro.com/download.php

2014/07/28

Linux Mint(or ubuntu) 快速安裝 postgresql 9.3


安裝 postgresql 9.3 伺服器程式
mt ~ # apt-get install postgresql-9.3

安裝 pgadmin3 的客戶端管理工具
mt ~ # apt-get install pgadmin3

切換到 postgres 帳號, postgres 預設沒有密碼且是 superuser 權限
mt ~ # su - postgres
postgres@mt ~ $ ls
9.3
postgres@mt ~ $ pwd
/var/lib/postgresql

建立使用者帳號,-r 能夠建立 role ,並且賦予  -s 超級使用者、-d 能夠建立 DB 、-l 能夠登入系統、-P能夠建立密碼
postgres@mt ~ $ createuser --r mtchang -s -d -l  -P
Enter password for new role:
Enter it again: 

建立一個資料庫 mtchang 屬於 -O mtchang 使用者的
postgres@mt ~ $ createdb  -O mtchang mtchang

設定 PGADMINIII 客戶端工具






以上為本機使用 postgresql 的安裝方式,如果還要讓外面的 IP 可以連到這台請參考這篇:

 http://jangmt.com/wiki/index.php/PostgreSQL_install

 另外附上 createuser 和 createdb 兩個指令的 HELP 說明


postgres@mt ~ $ createuser --help
createuser creates a new PostgreSQL role.

Usage:
  createuser [OPTION]... [ROLENAME]

Options:
  -c, --connection-limit=N  connection limit for role (default: no limit)
  -d, --createdb            role can create new databases
  -D, --no-createdb         role cannot create databases (default)
  -e, --echo                show the commands being sent to the server
  -E, --encrypted           encrypt stored password
  -i, --inherit             role inherits privileges of roles it is a
                            member of (default)
  -I, --no-inherit          role does not inherit privileges
  -l, --login               role can login (default)
  -L, --no-login            role cannot login
  -N, --unencrypted         do not encrypt stored password
  -P, --pwprompt            assign a password to new role
  -r, --createrole          role can create new roles
  -R, --no-createrole       role cannot create roles (default)
  -s, --superuser           role will be superuser
  -S, --no-superuser        role will not be superuser (default)
  -V, --version             output version information, then exit
  --interactive             prompt for missing role name and attributes rather
                            than using defaults
  --replication             role can initiate replication
  --no-replication          role cannot initiate replication
  -?, --help                show this help, then exit

Connection options:
  -h, --host=HOSTNAME       database server host or socket directory
  -p, --port=PORT           database server port
  -U, --username=USERNAME   user name to connect as (not the one to create)
  -w, --no-password         never prompt for password
  -W, --password            force password prompt

Report bugs to <pgsql-bugs@postgresql.org>.


postgres@mt ~ $ createdb --help
createdb creates a PostgreSQL database.

Usage:
  createdb [OPTION]... [DBNAME] [DESCRIPTION]

Options:
  -D, --tablespace=TABLESPACE  default tablespace for the database
  -e, --echo                   show the commands being sent to the server
  -E, --encoding=ENCODING      encoding for the database
  -l, --locale=LOCALE          locale settings for the database
      --lc-collate=LOCALE      LC_COLLATE setting for the database
      --lc-ctype=LOCALE        LC_CTYPE setting for the database
  -O, --owner=OWNER            database user to own the new database
  -T, --template=TEMPLATE      template database to copy
  -V, --version                output version infor

postgres@mt ~ $ createuser --r mtchang -s -d -l
postgres@mt ~ $ createdb --help
createdb creates a PostgreSQL database.

Usage:
  createdb [OPTION]... [DBNAME] [DESCRIPTION]

Options:
  -D, --tablespace=TABLESPACE  default tablespace for the database
  -e, --echo                   show the commands being sent to the server
  -E, --encoding=ENCODING      encoding for the database
  -l, --locale=LOCALE          locale settings for the database
      --lc-collate=LOCALE      LC_COLLATE setting for the database
      --lc-ctype=LOCALE        LC_CTYPE setting for the database
  -O, --owner=OWNER            database user to own the new database
  -T, --template=TEMPLATE      template database to copy
  -V, --version                output version information, then exit
  -?, --help                   show this help, then exit

Connection options:
  -h, --host=HOSTNAME          database server host or socket directory
  -p, --port=PORT              database server port
  -U, --username=USERNAME      user name to connect as
  -w, --no-password            never prompt for password
  -W, --password               force password prompt
  --maintenance-db=DBNAME      alternate maintenance database

By default, a database with the same name as the current user is created.

Report bugs to <pgsql-bugs@postgresql.org>.




2014/07/27

WAMPServer 2.5 php_pgsql.dll 有問題?無法正常的工作。

WAMPServer 2.5 php_pgsql.dll 有問題?無法正常的工作。

因為想要讓開發的工作更有效率,於是在自己的電腦上安裝 WAMP 當成本地端的開發工具

WAMP 預設的 DEBUG 工具很齊全,對於除錯真的很方便。

但今天改開發 PHP + PostgreSQL 的程式,發現明明 PHP_PDO_PGSQL 都有啟動,但是 phpinfo()

怎樣都看不到相關的模組訊息。(應該要有 pdo_pgsql and pdo_pgsql 這兩個模組才是)

查了半天,發現在 PHP for windows 5.25 "php_pgsql.dll" 還可以工作,升級 PHP 到 5.5.12 就不正常了....

快速的修正方式:

(1) 安裝 Postgresql for windows 版,在本地端機器上面。
http://www.enterprisedb.com/products-services-training/pgdownload#windows
裝好後,看看在地下的路徑是否有這個檔案 libpq.dll

(2) 將該檔案讓 apache 掛載

打開 windows apache httpd.conf 設定檔,找個好地方把底下這一行放到設定檔案內,然後重新啟動 APACHE

LoadFile "C:/Program Files/PostgreSQL/9.3/bin/libpq.dll"

(3) 去看看你的 http://localhost/?phpinfo 應該就有 pdo_pgsql and pdo_pgsql 這兩個模組了。

pdo_pgsql and pdo_pgsql 這兩個模組


參考:
http://stackoverflow.com/questions/551734/php-not-loading-php-pgsql-dll-on-windows

2014/07/23

jquery ajax 及事件用法的網摘紀錄



W3school 用來呼叫 jquery 使用ajax 的方法 -- jQuery ajax - post() 方法

jquery 官方網站關於 ajax 使用的說明 -- jQuery.post()

常用的表單驗證事件說明 --  [jQuery] jQuery常用的表單驗證事件

Jquery 的滑鼠點擊事件 -- http://api.jquery.com/click/

BootStrap 的 GRID 系統說明  -- Bootstrap 2.x 與 3 的重要差異(二):grid系統的變革

表單驗證防止天然呆的 JS for bootstrap --- http://bootstrapvalidator.com/

不是很熟 Javascript 建議最好從基礎了解 -- http://www.w3schools.com/js/default.asp

不得不說 W3school 的 JQUERY 說明做的很不錯 -- http://www.w3schools.com/jquery/default.asp

以上,簡單整理最近在用 Jquery 的心得及連結。

2014/07/19

WAMP 的 Apache Alias 權限問題(AH01630 ERROR)



* WAMP 的 Apache Alias 權限問題(AH01630 ERROR) 在目前版本的 WAMPServer 2.5 上面,其中的 Apache Alias 建立時,如果你使用預設的方式建立 Alias 設定檔,在重新載入後會產生權限錯誤。這問題的原因是 WAMP 把 Apache 更新到 2.4 以後的最新版本了,但是原本產生的 Alias 程式還是停溜在舊版本的設定值。

修正方法,請設定針對 Apache 2.4 以後的語法支援即可。

Alias /pma/ "C:/wamp/apps/pma/"

   Options Indexes FollowSymLinks MultiViews
   AllowOverride all
 
    Require local
 

 
    Order Deny,Allow
 Deny from all
 Allow from localhost ::1 127.0.0.1

錯誤訊息類似這樣:

[authz_core:error] [pid 5600:tid 832] [client 127.0.0.1:49226] AH01630: client denied by server configuration: C:/Apache24, referer: http://localhost/res/


延伸閱讀請參考:http://stackoverflow.com/questions/18392741/apache2-ah01630-client-denied-by-server-configuration

2014/07/18

Ext2 File System Driver for Windows( Windows 下讀寫 ext2 及 ext3 檔案系統)

Ext2 File System Driver for Windows( Windows 下讀寫 ext2 及 ext3 檔案系統)
通常我是用在雙系統的環境遇到大或多的檔案才使用,目前的 windows 及 linux 在平時工作的環境上都已經很成熟,除非遇到一些非 windows 不可的應用軟體資料。在切換 OS 的時候可以透過這方便的把它掛成一個磁碟來處理資料。

官方網站:http://www.ext2fsd.com/

功能:在 windows 下以磁碟機方式掛載 ext2 or ext3 or ext4 的檔案系統來讀寫

限制:Linux 下的 ext3/ext4 擴充功能 ACL 、符號連結等.....

下載:http://sourceforge.net/projects/ext2fsd/files/ --> ext2FSD(2014/5/11) 更新

Ext2 的設定頁面,直接將 ext3 or ext2 的分割區設定為一個磁碟代號就可以。

2014/06/16

RHEL 7 yum repository 安裝 Apache + PHP 網站服務

自從 RHEL 7 Release 之後,要測試及安裝軟體都變得很麻煩,剛剛就自己重製了一份 yum 的儲存庫來使用,至少在 CENTOS 7 正式版出來前先這樣撐著用巴。
建立方式可以參考之前的 RHEL5 的作法,到 7 版方式雷同。

請到你的 /etc/yum.repos.d/ 目錄下,建立一個 local.repo 檔案。
[root@localhost yum.repos.d]# pwd
/etc/yum.repos.d 
[root@localhost yum.repos.d]# nano local.repo
[rhel7-server]
name = rhel7 server DVD 64bit
baseurl = http://mt.jangmt.com/rhel7/RHEL-7.0Server.x86_64/
enabled = 1
gpgcheck = 0 
[rhel7-support]
name = rhel7 support DVD 64bit
baseurl = http://mt.jangmt.com/rhel7/Supp-7.0RHEL-7Server.x86_64/
enabled = 1
gpgcheck = 0

裝好後安裝個 apache + PHP 服務在 RHEL7 上面巴。

因為 CENTOS7 已經正式出現了,所以可以直接使用 CENTOS7 的 REPO 當作系統的軟體來源:

目前系統 CentOS 7 的主要 REPO 檔案如下:
[root@mtchang yum.repos.d]# cat /etc/yum.repos.d/CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

如果沒問題就可以直接安裝了。

apache 安裝
[root@localhost ~]# yum -y install httpd httpd-devel httpd-manual

檢查 php 是否有安裝 ,如果沒有請使用 yum 安裝下列套件
[root@localhost ~]# yum -y install php-mysql php-mbstring \
php-soap php-xml php-mcrypt php-pear php-cli php-devel php-gd

啟動 apache 現在已經改成 systemctl 指令來控制了。
[root@localhost ~]# /bin/systemctl restart  httpd.service

測試... http://localhost/



這個版本已經變更為 Apache 2.4 了,如果你沒有出現這個畫面我猜可能是預設開啟的防火牆擋住了,先暫時用圖形界面把它關掉就好了。指令要關掉有點麻煩,用圖形比較快。

補充說明:
EPEL7 也有出現了,可以直接到 https://fedoraproject.org/wiki/EPEL 這個網站抓取 rpm 安裝 REPO設定。裝完後應該長的類似如下:

[root@mtchang yum.repos.d]# cat /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

2014/05/19

Linux 不用超級使用者的掛載(mount)方式(The non-superuser mounts.)

Linux 不用超級使用者的掛載(mount)方式(The non-superuser mounts.)
正常再 LINUX 內只有超級使用者可以掛載檔案系統,如果要讓一般使用者掛載某個檔案,只需要再 fstab 的參數加入 user 這個選項一般使用者就可以使用一般使用者的權限掛載檔案系統。


mtchang@mtchang-BM6660-BM6360:~$ cat /etc/fstab
# /etc/fstab: static file system information.
# that works even if disks are added and removed. See fstab(5).
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
UUID=9c55a017-2ecc-46f2-853c-c43215884821 /home/mtchang/3gbhd        ext4    defaults,user    0    0

詳細請見 man 5 fstab

      The fourth field (fs_mntops).
              This field describes the mount options associated with the filesystem.

              It  is  formatted as a comma separated list of options.  It contains at least the type of mount
              plus any additional options appropriate to the filesystem type. For documentation on the avail‐
              able  mount  options,  see  mount(8).   For  documentation  on  the available swap options, see
              swapon(8).

              Basic file system independent options are:

              defaults
                     use default options: rw, suid, dev, exec, auto, nouser, and async.

              noauto do not mount when "mount -a" is given (e.g., at boot time)

              user   allow a user to mount

              owner  allow device owner to mount

              comment
                     for use by fstab-maintaining programs

              nofail do not report errors for this device if it does not exist.

什樣的狀況會用到這個方式勒?我的狀況是用在個人桌面使用的 linux 系統,因為大容量的硬碟是自己再備份資料時才會用到存取,且因為買的較便宜的速度相對較慢。所以就把他拿來掛載在個人工作的目錄上面,所以使用到這樣的方式。至於主系統碟,當然能用 SSD 之類的就更棒了,但畢竟 SSD 還是太貴呀!!!



2014/05/09

linux 文字命令列的 youtube-dl


WALALA.....為何有這個指令被收錄在 ubuntu 和 rhel EPEL 的套件內勒!!!

安裝 youtube-dl 工具

mtchang@ ~$ sudo apt-get install youtube-dl
[sudo] password for mtchang:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following extra packages will be installed:
  libav-tools libavdevice53 libavfilter3 libbs2b0 libgif4 libquvi-scripts libquvi7 libvdpau1
  mplayer2 rtmpdump
Suggested packages:
  frei0r-plugins nvidia-vdpau-driver vdpau-driver ffmpeg mplayer
The following NEW packages will be installed:
  libav-tools libavdevice53 libavfilter3 libbs2b0 libgif4 libquvi-scripts libquvi7 libvdpau1
  mplayer2 rtmpdump youtube-dl
0 upgraded, 11 newly installed, 0 to remove and 36 not upgraded.
Need to get 4,766 kB of archives.
After this operation, 14.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

執行擷取某個影音檔
mtchang@~/Videos$ youtube-dl http://www.youtube.com/watch?v=iV8JDbtXZm4
[youtube] Setting language
[youtube] iV8JDbtXZm4: Downloading webpage
[youtube] iV8JDbtXZm4: Downloading video info webpage
[youtube] iV8JDbtXZm4: Extracting video information
[download] Destination: 〈島嶼天光〉(Island's Sunrise)藝術計劃 太陽花學運歌曲-iV8JDbtXZm4.mp4
[download] 100% of 81.57MiB in 00:09


裡面有個功能是可以將抓下來的影片直接透過後製的轉換程式直接轉換成為 mp3

   Post-processing Options:
              -x, --extract-audio              convert video files to audio-only files
                                               (requires ffmpeg or avconv and ffprobe or
                                               avprobe)
              --audio-format FORMAT            "best", "aac", "vorbis", "mp3", "m4a",
                                               "opus", or "wav"; best by default
              --audio-quality QUALITY          ffmpeg/avconv audio quality specification,
                                               insert a value between 0 (better) and 9
                                               (worse) for VBR or a specific bitrate like
                                               128K (default 5)
              --recode-video FORMAT            Encode the video to another format if
                                               necessary (currently supported:
                                               mp4|flv|ogg|webm)
              -k, --keep-video                 keeps the video file on disk after the
                                               post-processing; the video is erased by
                                               default
              --no-post-overwrites             do not overwrite post-processed files; the
                                               post-processed files are overwritten by
                                               default
              --embed-subs                     embed subtitles in the video (only for mp4
                                               videos)
              --add-metadata                   write metadata to the video file
              --xattrs                         write metadata to the video file's xattrs
                                               (using dublin core and xdg standards)
              --prefer-avconv                  Prefer avconv over ffmpeg for running the
                                               postprocessors (default)
              --prefer-ffmpeg                  Prefer ffmpeg over avconv for running the
                                               postprocessors




作者的網站:http://rg3.github.io/youtube-dl/

詳細的文件請參考這裡:http://rg3.github.io/youtube-dl/documentation.html#d1

2014/05/04

某個 54 運動 ?? 的所佔面積

今天某個 54 運動 ?? 的所佔面積計算,剛剛用 google map 和 autocad 小算了一下,看起來照片中的區塊為 3751 平方公尺,至於每平方公尺要乘以多少人.,請大家參考底下的圖片心算一下巴。









延伸閱讀:
http://newtalk.tw/news/2014/05/04/46931.html  凱道「新五四運動」 警方估有萬人參與

2014/04/20

自己的國寶自己救,地方的石虎需要大家的關心

因為工作的關係,常常需要把繪製的管路轉接圖面用紙張轉換檢查是否有繪製錯誤,就有想到是否可以用這樣一系列的紙張,做出有趣的東西。

paper models 紙模型 可以找到很多免費的資訊,但是一個好的紙模型,需要花時間設計及尋找...尤其要給小孩子練習的紙模型。

底下是從網路上找到的石虎紙模型,同時也要告訴大家地方的石虎需要大家的關心。



原始檔案下載:紙漫糖

2014/04/06

高雄市可以免費領取苗木的地方:楠梓苗圃及深水苗圃


楠梓苗圃是高雄市政府養工處的在楠梓少年地方法院後面,離高雄市區很近是很方便的地方。及深水苗圃是高雄市農業局的,剛好在高師大燕巢校區的後方,看起來有點小遠。

楠梓苗圃可以個人身份證領三株苗木,每三個月可以領用一次。底下為其說明:

高雄市政府工務局養護工程處
楠梓苗圃苗木申領作業需知
一. 領苗流程:
(一)一般民眾申請(限高雄市民):
憑身份證正本申請,現場填寫申請書,每張身份證可提領3株苗木,每次提領不限1張身份證,3個月限領1次。
(二)單位機關申請正式函文申請:
1.函文內容請述明:申請單位、發文日期、聯絡電話、地址、苗木種類、數量、申領苗木用途等其他事項。
2.本處審核並函覆核撥數量。
3.持函提領苗木。
二. 提領時間:上午8:30~11:30 下午2:00~5:00
例假日(星期六、日)及國定假日休息不開放。
三. 聯絡電話:07-3550524 陳秀麗班長
四. 提領地點:楠梓苗圃(楠梓區興楠路左轉)常德路與常興街交叉路口



楠梓苗圃的地點沒有明顯的指標(位於高雄市楠梓區常德路與常興街交叉路口),詳細請參考底下地圖:




門口的領用須知


門口的規定


領用登記區,剛好遇到幼稚園整團帶來戶外交學兼拿樹苗。



如果要到深水苗圃領苗木請見他的網站說明,兩個地點其實有順路....
個人憑身份證,每人以5株以內為限(每年限申請一次) ...



在較大的地圖上查看深水苗圃

2014/03/28

將Windows 8 安裝傳統選單工具列(Classic Shell)

名稱:Classic Shell

用途:可以讓 windows 8 及 windows 8.1 擁有傳統的選單

下載:http://www.classicshell.net/downloads/

心得:他有 opensource 並放在 sf.net 所以我才推薦。且用起來還不錯,品質可以接受。

Classic Start



2014/02/27

高雄空拍圖(高雄市都市發展局--空中看大高雄)


高雄空拍圖(高雄市都市發展局--空中看大高雄)

http://urban-web.kcg.gov.tw/airks/web_page/KDA130200.jsp?KDA012003=A01

但是如果從都發局的網站裡面,是找不到連結的....,授權很開放,這麼漂亮的圖片藏的那麼難找,真的很麻煩。