-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.xml
More file actions
138 lines (122 loc) · 9.89 KB
/
Copy pathindex.xml
File metadata and controls
138 lines (122 loc) · 9.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>MarkTsai</title>
<link>https://marktw75.github.io/</link>
<description>Recent content on MarkTsai</description>
<generator>Hugo -- gohugo.io</generator>
<language>zh-tw</language>
<lastBuildDate>Tue, 21 Mar 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://marktw75.github.io/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>相片自動備份系統</title>
<link>https://marktw75.github.io/posts/photo-backup-system/</link>
<pubDate>Tue, 21 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://marktw75.github.io/posts/photo-backup-system/</guid>
<description>這個系統是安裝在Linux Server上,透過
DropBox + Shell Scripting + Rsync + crontab
定期搬移備份檔案。
DropBox在上傳相片和影片時,會用精確到秒的時間為檔名。如果有二台手機在同一秒同時上傳多個檔案,會用-#的方式自動命名,十分方便。缺點就是免費空間太小了,付費又有點吃不消。
所以就是在File server上安裝Linux版本的DropBox,定期搬走影片及相片檔,充分利用免費空間。再用rsync的檔案多備份一份。
========
在使用DropBox管理相片之前,個人會定期把相機跟手機上的相片備份到電腦中,再用相片管理程式,像是XnView,對照片做批次改檔名。檔名就會變成下列的樣子:
2015_0320_mark-001.jpg
2015_0320_mark-002.jpg
2015_0320_mark-###.jpg
其中###是相片管理程式改名時的語法,會根據幾個#把檔案加上數字,不足位數的就補零。
這個方法有個很大的問題就是,不同設備的相片檔命名格式不同。那時我有一台相機,二台手機,保姆有時會分享相片,幼稚園也會定期分享小孩相片,所有相片收集到的時間不同, 全部塞入同一個資料夾時,也只能用相片拍攝的時間來排序再改名,有時遇到相機時間設定有誤,或分享的相片時間被改過,就會造成一些混亂。
而且所謂的定期是不固定的,收集整理的步驟有點繁複,有時人一懶就卡一堆相片在某個檔案夾中。時間一久,有時不小心備份個兩份,或不小心又拷貝到已經批次改名過的相片,也會搞得亂七八糟。
這個情況到了2015年的12月就有所改變了。那時DropBox正在推行中,它提供了2G的空間給免費帳戶,勤快點完成一些任務就可以把個人空間提高到6G以上。最方便的是安裝在手機上,可以自動偵測 新增的相片檔及影片檔,然後上傳到雲端。電腦上也可以安裝,初期是完全不限制同一個帳號可以安裝的設備數量。
所以我就在所有可以控制的手機及電腦上安裝了DropBox。相片檔及影片檔會依時間重新命名並被存放在Camera Upload的檔案夾中。檔名如下:
2015-12-18 10.25.43.jpg
2015-12-18 19.16.52-1.jpg
2015-12-18 19.16.52-2.jpg
可以看到檔名精確到秒,同一秒快怕的相片也會依順序加上-#的後綴。
所以從2016起,整理照片的工作就簡化了收集和整理的步驟。那時是在桌機上安裝DropBox,相機的相片使用有wifi功能的記憶片傳送到手機中,手機的相片則是傳到雲端,再回到桌機上確認。DropBox免費空間用完後, 相片跟影片就無法上傳,所以得定時把檔案從Camera Upload的檔案夾中搬走。我是先把檔案搬到一塊500G的外接硬碟中,然後再買了一塊750G的外接硬碟用來備份相片及影像檔。
但這個定期搬檔案及備份檔案的步驟還是有時會因為設備上傳時間的誤差,加上人為操作失誤,造成不同相片,先進雲端但被搬走,而被後來進雲端的相片蓋掉的悲劇發生
======
所以我想把搬相片跟備份的工作自動化。。
細節未完待補。</description>
</item>
<item>
<title>半澤直樹中的Linux指令</title>
<link>https://marktw75.github.io/posts/hanzawa-sp-linux/</link>
<pubDate>Mon, 06 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://marktw75.github.io/posts/hanzawa-sp-linux/</guid>
<description>2020年初播出半澤直樹特別篇,半澤直樹II.Episode Zero
這個為第二季開播暖身的特別篇講述了半澤直樹被調職到子公司東京中央證券,某技術高超的程式員高阪圭所屬的IT公司,與東京中央證券合作開發IT系統,可是在過程中,出差的半澤直樹帳號竟被駭客入侵,密碼遭到外洩,有多筆款項從半澤的帳號被匯出,導致高阪圭與另一位女主成為最大嫌疑人,兩人為了查出真相並且洗清自己的罪名,合力找出幕後黑手。
刻板印象,厲害的工程師一定是用Mac的。
劇中出現不少電腦畫面,其中只要是出現linux相關的指令或畫面都會令我眼睛一亮,有鑑於之前台灣某鄉土劇出現過駭客高手在windows的cmd視窗輸入指令找不到的搞笑畫面,這回再度回味特別篇時,認真的截了一些跟指令相關的畫面,大家一起來看看吧。
不得不說,劇組還是很認真的&hellip;.
terminal的分割畫面
熟悉的top顯示資訊
劇中出現的一些指令,Spiral是公司名稱。
$ pwd $ ls -al $ kbctl get pod $ cloud container clusters create spiral-web-144 $ /opt/spiral/tools/server-status $ ps -ef $ ps -ef | grep spiral $ grep ERROR /opt/spiral/log/*.log $ nslookup 192.168.30.45 $ sudo cat /var/log/secure 發現木馬程式,在測試環境中執行發現它會大量覆蓋重要程式。
$ ps -ef | grep 4kzd root 4340 2 0 ? 00:02:34 4kzdcvac $ sudo kill -9 4340 其中有一幕是存款被木馬程式轉出去,緊急下了shutdown的指令,因為很重要,還連打了三次。
$ sudo shutdown -h now Server cannot be shutdown.</description>
</item>
<item>
<title>Github架站筆記</title>
<link>https://marktw75.github.io/posts/github-personalsite-note/</link>
<pubDate>Sun, 05 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://marktw75.github.io/posts/github-personalsite-note/</guid>
<description>大概做一下筆記
安裝
安裝Hugo程式,下載Coder主題。將主題解壓縮後,再使用Eclipse編輯。
編輯的過程中,Hugo server可以即時呈現改好的內容,十分方便。
C:\Users\markt\dev\exampleSite&gt;hugo server 產生網頁
用Hugo的功能產生網頁,再把產生在public檔案來中的檔案上傳到github上。
C:\Users\markt\dev\exampleSite&gt;hugo 設定Utterances留言系統
打開utterances的安裝網頁,並在config.toml設定
[params.utterances] repo = &#34;marktw75/marktw75.github.io&#34; # https://utteranc.es/#heading-repository issueTerm = &#34;pathname&#34; # https://utteranc.es/#heading-mapping label = &#34;comment&#34; # https://utteranc.es/#heading-issue-label theme = &#34;github-light&#34; # https://utteranc.es/#heading-theme 設定Google Analytics
到Google Analytics註冊登記個人網站,再把得到的ID加入設定檔中
googleAnalytics = &#39;id&#39; 加入Google Search Console
到Google Search Console設定,過了兩天,用文章標題查詢終於可以搜尋到。
更改favicon
上網找到線上繪圖工具畫了 favicon-16x16.png和 favicon-16x16.png,放到 static/images中,取代原先的檔案。</description>
</item>
<item>
<title>樹莓派遊樂場</title>
<link>https://marktw75.github.io/posts/retropie-oldgames/</link>
<pubDate>Thu, 02 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://marktw75.github.io/posts/retropie-oldgames/</guid>
<description>手上有兩台Raspberry Pi,分別是
Raspberry Pi 3 B 1GB Raspberry Pi 4 B 4GB 目前都裝上了Repropie,真的有在玩的遊戲以大型電玩,紅白機和超任為主,算是彌補了小時候沒錢投幣,國三後忙升學沒好好玩的遺憾。
細節待補。</description>
</item>
<item>
<title>個人私有雲</title>
<link>https://marktw75.github.io/posts/private-cloud/</link>
<pubDate>Wed, 01 Mar 2023 00:00:00 +0000</pubDate>
<guid>https://marktw75.github.io/posts/private-cloud/</guid>
<description>Linux Mint + Samba Server + OpenVPN
OpenVPN是用Router本身的功能。也就是連到家中的私人網路後,再透過Samba讀取檔案。
缺點就是電費穩定成長有時挺嚇人的。夏日電費我收過九千多。不過在世界各地都能連回家捉檔案的感覺還是滿爽的。
細節待補。</description>
</item>
<item>
<title>About</title>
<link>https://marktw75.github.io/about/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://marktw75.github.io/about/</guid>
<description><p>這個網站是個人經由hahow學習 <a href="https://hahow.in/courses/5de8fec16117240026540b9c/main">Github 免費架站術!輕鬆打造個人品牌</a> 課程後,所架設的網站。</p>
<p><em><strong>給我一台電腦或筆電,<br>
腦中浮現的第一個念頭就是,<br>
可以灌Linux OS嗎?</strong></em></p>
<hr></description>
</item>
<item>
<title>NES/Famicom</title>
<link>https://marktw75.github.io/posts/nes-games/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://marktw75.github.io/posts/nes-games/</guid>
<description>Please refer to all NES games in wikipedia.</description>
</item>
<item>
<title>SNES/SFC</title>
<link>https://marktw75.github.io/posts/snes-games/</link>
<pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
<guid>https://marktw75.github.io/posts/snes-games/</guid>
<description>Please refer to all SNES games in wikipedia.</description>
</item>
</channel>
</rss>