自由學習的風

幽夢影 張潮 少年讀書,如隙中窺月;中年讀書,如庭中望月;老年讀書,如臺上玩月。皆以閱歷之淺深,為所得之淺深耳。

lftp 下載/上傳整個目錄

2018年4月23日 星期一

lftp 比 ftp 方便多了,特別當需要上傳或下載整個目錄時,特別方便。
下載整個目錄   mirror  <dir_name>
上傳整個目錄   mirror  -R  <local_dir_name>

lftp 連上後無法顯示目錄檔案

在 Ubuntu 16.04 上安裝  lftp 程式,連上 ftp 站台後無法顯示目錄檔案。
出現的錯誤訊息為:
Fatal error: Certificate verification: Not trusted
解決方法為:
編輯  /etc/lftp.conf 檔案
在檔案結尾加上 下列指令,重新連上就可以正常顯示了。
set ssl:verify-certificate no

[Ubuntu] Apache2 虛擬網頁置於非預設網站目錄

2018年4月5日 星期四

虛擬網站目錄若不是放在預設的 www 目錄下,就會出現  forbidden 無法瀏覽的訊息。只要增加 該目錄的的區段設定,就可以正常瀏覽了

例:  testsite 放在 /opt 底下

        DocumentRoot /opt/testsite
        <Directory /opt/testsite/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Require all granted
        </Directory>



[Ubuntu] Apache2 設定監聽 port


情境1:監聽 8000 port,網站目錄置於 /var/www/html/testsite
方式:
  1.增加監聽 port    /etc/apache2/ports.conf
  2. 新增網站設定檔  testsite.conf
/etc/apache2/sites-available# cp  000-default.conf   testsite.conf

    #  a2ensite   testsite
    #  systemctl   restart   apache2.service


[Ubuntu] Google Chromecast 突然無法在chrome 瀏覽器上播放

2018年2月4日 星期日

適用 chrome 55 以後版本


  • 在網址列上輸入 「chrome://flags/#media-router」
  • 將 「Default」 改為 「Disable」
  • 重新啟動  Google Chrome

[批次檔] for 迴圈的變數利用方式

2018年1月27日 星期六

在 Windows 寫批次檔,利用  for 指令跑迴圈取得檔案資訊時,可以使用的修飾元

%~I         - expands %I removing any surrounding quotes (")
%~fI        - expands %I to a fully qualified path name
%~dI        - expands %I to a drive letter only
%~pI        - expands %I to a path only
%~nI        - expands %I to a file name only
%~xI        - expands %I to a file extension only
%~sI        - expanded path contains short names only
%~aI        - expands %I to file attributes of file
%~tI        - expands %I to date/time of file
%~zI        - expands %I to size of file
%~$PATH:I   - searches the directories listed in the PATH
               environment variable and expands %I to the
               fully qualified name of the first one found.
               If the environment variable name is not
               defined or the file is not found by the
               search, then this modifier expands to the
               empty string

%~dpI       - expands %I to a drive letter and path only
%~nxI       - expands %I to a file name and extension only
%~fsI       - expands %I to a full path name with short names only
%~dp$PATH:I - searches the directories listed in the PATH
               environment variable for %I and expands to the
               drive letter and path of the first one found.
%~ftzaI     - expands %I to a DIR like output line

障礙不障礙

2018年1月24日 星期三

個人看法:
現行的無障礙規範對網頁設計的影響,有時不是簡單的讓有障礙的人無障礙,影響更大的是網頁設計人員、網站網理人員、平台使用人員, 2.0 的後續反應,可能會變成

反應一:完全不管障不障礙

反應二:符合無障礙,承辦人累得要死…

反應三:符合無障礙,但是為了不爆肝,所以…

  • 資料變成要登入才看得到
  • 網站會盡量不變動
  • 公告的話,盡量用純文字
  • 活動花絮、照片、影片之類的改成 youtube、google photo 或是 fb 粉絲團,讓人加入自己去訂閱