tag:blogger.com,1999:blog-68727492024-02-29T04:43:12.449+08:00Cookys' Blog網路、工作、技術cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.comBlogger84125tag:blogger.com,1999:blog-6872749.post-45359837162737537802023-04-21T10:28:00.002+08:002024-01-05T18:19:13.789+08:00Windows 11 下的 Python<p> 想要玩不同的套件,但是套件的 python 版本全都卡死,那就是之前在 gentoo 上的災難重演。</p><p>所以馬上想到了 virtual_env ,看了一下 windows 底下應該是用 <a href="https://docs.conda.io/en/latest/" target="_blank">conda </a>比較方便,所以就進了一段亂七八糟的砍掉重練試錯期。後來發現,直接裝 <a href="https://www.anaconda.com/" target="_blank">ANACONDA</a> 其實蠻方便的,注意不要被 Windows 的自動應用程式執行別名<a href="https://blog.darkthread.net/blog/python-in-windows10/" target="_blank">搞到</a>就好。</p><p>先安裝 anaconda3</p><pre class="code" style="background: rgb(242, 241, 240); border: 1px solid rgb(221, 221, 221); color: #373737; font-family: "Courier 10 Pitch", Courier, monospace; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin-bottom: 1.625em; outline: 0px; overflow: auto; padding: 10px; vertical-align: baseline;">>choco install anaconda3</pre>
<p>然後建立一個 env </p><span></span><p><span face="source-code-pro, Menlo, Monaco, "Courier New", Courier, monospace" style="background-color: #f2f2f2; color: #292929; font-size: 16px; letter-spacing: -0.352px; white-space: pre-wrap;">conda create --name myenv python=3.11</span></p><p>然後把 cmder 的 task clone 一份出來修改,加入</p><pre class="code" style="background: rgb(242, 241, 240); border: 1px solid rgb(221, 221, 221); color: #373737; font-family: "Courier 10 Pitch", Courier, monospace; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin-bottom: 1.625em; outline: 0px; overflow: auto; padding: 10px; vertical-align: baseline;">cmd /k ""%ConEmuDir%\..\init.bat" " & C:\tools\Anaconda3\Scripts\activate.bat C:\tools\Anaconda3 && conda activate virtual_env_name && cd \the\path\you\want\to\go\</pre><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEguYOU5cgPAUVr_PMtF3YUpRIYNNEe_OJWdxTRe5D_3I8M5XE7Z4OoPKjniNxrVC2vaHMs9EICI0DuJTv6O6VAQJG6g2jCRy3UJ46siuf11JPQfpebOuIMDB2QkYfEGktEauwLoSaPSokB9NOm8y3JzZshL73d3su0cGpexy2hSxoo3hC6yWuI" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img data-original-height="626" data-original-width="880" src="https://blogger.googleusercontent.com/img/a/AVvXsEguYOU5cgPAUVr_PMtF3YUpRIYNNEe_OJWdxTRe5D_3I8M5XE7Z4OoPKjniNxrVC2vaHMs9EICI0DuJTv6O6VAQJG6g2jCRy3UJ46siuf11JPQfpebOuIMDB2QkYfEGktEauwLoSaPSokB9NOm8y3JzZshL73d3su0cGpexy2hSxoo3hC6yWuI=s16000" />
</a><br /></div><br />
<p>就可以繼續胡亂玩耍了</p>
cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-62068356816622154732019-10-16T00:25:00.001+08:002019-10-16T00:25:34.115+08:00Raspberry Pi 4 超頻<br />
超頻<br />
<pre class="code" style="background: rgb(242, 241, 240); border: 1px solid rgb(221, 221, 221); color: #373737; font-family: "Courier 10 Pitch", Courier, monospace; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin-bottom: 1.625em; outline: 0px; overflow: auto; padding: 10px; vertical-align: baseline;">/boot/config.txt
[pi4]
over_voltage=6
arm_freq=2147
</pre>
<br />
看頻率<br />
<pre class="code" style="background: rgb(242, 241, 240); border: 1px solid rgb(221, 221, 221); color: #373737; font-family: "Courier 10 Pitch", Courier, monospace; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin-bottom: 1.625em; outline: 0px; overflow: auto; padding: 10px; vertical-align: baseline;">$ cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
$ cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq</pre>
看溫度<br />
<br />
<pre class="code" style="background: rgb(242, 241, 240); border: 1px solid rgb(221, 221, 221); color: #373737; font-family: "Courier 10 Pitch", Courier, monospace; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; margin-bottom: 1.625em; outline: 0px; overflow: auto; padding: 10px; vertical-align: baseline;">vcgencmd measure_temp
</pre>
cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-23410247395609872742019-08-16T11:14:00.000+08:002019-08-16T11:14:47.742+08:00Gentoo 解救中文 mount share公司的 nas mount 完之後,變成全部亂碼,觀察了一下發現是沒設定 Locales 導致,所以:
修改 /etc/locale.gen
<pre class="code prettyprint">
en_US.UTF-8 UTF-8
zh_TW.UTF-8 UTF-8
</pre>
然後
<pre class="code prettyprint">
locale-gen
eselect locale list
eselect locale set n
</pre>
.bashrc 加入或修改
<pre class="code prettyprint">
export LANG="en_US.UTF-8"
export LC_COLLATE="C"
</pre>
不用 LANG="zh_TW.URF-8" 是因為中文化之後很多錯誤訊息會看不懂 lol
參考:<a href="https://wiki.gentoo.org/wiki/Localization/Guide">Gentoo Wiki</a>cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-74758573955710832162019-08-16T10:41:00.001+08:002019-08-16T10:41:38.837+08:00Gentoo Linux 下用 Smbnetfs Mount CIFS不想要直接在 fstab 裡面把一些私人的網方分享 mount 上來的做法:<br />
<br />
<pre class="code prettyprint">emerge --ask net-fs/smbnetfs
mkdir ~/.smb
bunzip2 -c /usr/share/doc/smbnetfs-0.6.0/smbnetfs.conf.bz2 > ~/.smb/smbnetfs.conf
vim ~/.smb/smbnetfs.auth
chmod 600 ~/.smb/smbnetfs.auth
smbnetfs -o uid=你的uid,gid=你的gid,umask=0022 ~/mnt
</pre>
使用方式<br />
<pre class="code prettyprint">ls -al ~/mnt/SAMBAIP</pre>
<br />
當中 smbnetfs.auth 格式:<br />
<pre class="code prettyprint">auth serverip username "PASSWORD"</pre>
<br />
<br />
參考
<ul>
<li><a href="https://wiki.gentoo.org/wiki/Smbnetfs">Gentoot Wiki</a></li>
<li><a href="http://www.wrstone.com/wrstone/cred/snippets/smbnetfs">SMBNETFS Configuration</a></li>
<li><a href="https://gist.github.com/kyamagu/5de714c831431b4e8002782113b91769">smbnetfs-setup.md</a></li>
</ul>
cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-5507593523850280792018-03-02T20:12:00.000+08:002018-03-02T20:12:32.364+08:00合併兩個 git repo 成為一個假設現在有兩個 ProjectA 和 ProjectB ,希望他們變成一個 Project 裡面的子目錄<br />
<br />
ProjectC/<br />
|- /ProjectA<br /> |- /ProjectB<br />
<br />
做法:<br />
<br />
<ol>
<li>先到 ProjectA/ProjectB 裡面建立子目錄,方便識別,叫做 PDA/PDB
<pre class="code prettyprint">
cd ProjectA
mkdir ProjectA
cd ProjectB
mkdir ProjectB
</pre></li>
<li>用 git mv -k 把 * 都搬進 PDA/PDB 裡面,注意 dot 開頭的檔案 * 吃不到
<pre class="code prettyprint">
cd ProjectA
git mv -k * ProjectA
cd ProjectB
git mv -k * ProjectB</pre></li>
<li>git commit 到 local repo 暫存著<pre class="code prettyprint">
cd ProjectA
git commit -m "合併 repo"
cd ProjectB
git commit -m "合併 repo"</pre></li>
<li>到 ProjectC 目錄裡面用 git remote add 把 ProjectA , ProjectB 兩個 local repo 加進來
<pre class="code prettyprint">
cd ProjectC
git remote add PDA ../ProjectA
git remote add PDB ../ProjectB
</pre></li>
<li>git checkout 到每個要處理的 branch ,例如 develop / master ,依次 pull 每個 repo branch<pre class="code prettyprint">
git checkout master
git pull PDA master
git pull PDB master
git checkout develop
git pull PDA develop
git pull PDB develop</pre></li>
<li>用 git log 查看是否正確<pre class="code prettyprint">
git log --oneline --graph --decorate --all</pre></li>
<li>git push<pre class="code prettyprint">git push</pre></li>
</ol>
cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com1tag:blogger.com,1999:blog-6872749.post-324884612386307812018-03-02T19:50:00.000+08:002018-03-02T19:50:50.210+08:00git sparse checkout<pre class="code prettyprint">
git clone -n git@git.example.com:Project/Demo.git
git config core.sparsecheckout true
echo "Path/You/Want/To/Checkout/" >> .git/info/sparse-checkout
git checkout develop
</pre>
cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-10143857904596401692016-11-30T16:57:00.001+08:002016-11-30T16:57:58.476+08:00拆解 git 下的目錄成為新的 repoWindows 系統要注意 / 方向。
<br />
<pre class="code prettyprint">git filter-branch -f --subdirectory-filter 這裡/是你/要拆/的/子目錄 -- --all
git remote -v
git remote set-url origin https://gitlab.example.com/Demo/DemoPoroject.Web.git
git remote -v
git push -u origin master
git remote set-url origin https://github.com/本來/的.來源.git
git pull
git reset origin/master --hard
</pre>
然後重複以上動作即可。cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-66578238664377257282016-11-30T11:57:00.002+08:002016-11-30T11:57:58.558+08:00Install GitLab on FreeBSD 10網路上比較多看到的文章大概是:<br />
<a href="https://github.com/gitlabhq/gitlab-recipes/blob/master/install/freebsd/freebsd-10.md">Installing GitLab on FreeBSD 10</a><br />
不過他是手動用 gem 裝,個人不是很喜歡這種方式,想到之前看 <a href="https://www.freebsd.org/news/status/report-2016-04-2016-06.html">2016 June Status Report</a> 好像依稀有看到 <a href="https://www.freebsd.org/news/status/report-2016-04-2016-06.html#Bringing-GitLab-into-the-Ports-Collection">Bringing GitLab into the Ports Collection</a> 就翻了一下,所以照著 pkg-message 裡面的<a href="https://github.com/t-zuehlsdorff/gitlabhq/blob/master/doc/install/installation-freebsd.md">指示文件</a>設定,不過會卡一些小地方,記錄下來避免以後需要重新查。<br />
<br />
<br />
首先,更新你的 ports tree<br />
<pre class="code prettyprint">sudo portsnap fetch update</pre>
然後,進場安裝 gitlab
<br />
<pre class="code prettyprint">cd /usr/ports/www/gitlab</pre>
然後照著 <a href="https://github.com/t-zuehlsdorff/gitlabhq/blob/master/doc/install/installation-freebsd.md">文件</a> 一步一步設定,大致上就能跑起來。
當中遇到幾個小問題:
現存 nginx 已經設定過,所以要自己生一組 vhost 設定檔,姑且叫他 gitlab.conf:
<pre class="code prettyprint">
upstream gitlab-workhorse {
server unix:/usr/local/www/gitlab/tmp/sockets/gitlab-workhorse.socket fail_timeout=0;
}
server {
listen 80;
server_name 你的DOMAIN;
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443;
server_name 你的DOMAIN;
server_tokens off;
charset utf-8;
error_log /PATH_TO/nginx-error.log info;
access_log /PATH_TO/nginx-access.log combined;
ssl on;
ssl_certificate /PATH_TO/ssl.pem;
ssl_certificate_key /PATH_TO/ssl.key;
location / {
client_max_body_size 0;
gzip off;
## https://github.com/gitlabhq/gitlabhq/issues/694
## Some requests take more than 30 seconds.
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://gitlab-workhorse;
}
error_page 404 /404.html;
error_page 422 /422.html;
error_page 500 /500.html;
error_page 502 /502.html;
error_page 503 /503.html;
location ~ ^/(404|422|500|502|503)\.html$ {
root /usr/local/www/gitlab/public;
internal;
}
}
</pre>
然後把 nginx 重跑,記得先把 gitlab 跑起來
<pre class="code prettyprint">service gitlab start</pre>
然後可以注意一下 gitlab:check 裡面的問題,一一把它修復:
<pre class="code prettyprint">
cd /usr/local/www/gitlab
rake gitlab:check RAILS_ENV=production
</pre>
當中我一直遇到 gitlab-shell 的問題
<pre class="code prettyprint">
cd /usr/local/share/gitlab-shell/
./bin/check
</pre>
發現說我 url 改錯了,所以,所以編輯一下
<pre class="code prettyprint">
#不是 FQDN
gitlab_url: "http://localhost:8080"
http_settings:
self_signed_cert: false
auth_file: "/PATH_TO_UR_SSH_AUTH_FILE/authorized_keys"
# File that contains the secret key for verifying access to GitLab.
# Default is .gitlab_shell_secret in the root directory.
# secret_file: "/home/git/gitlab-shell/.gitlab_shell_secret"
# Redis settings used for pushing commit notices to gitlab
redis:
bin: /usr/bin/redis-cli
database: 0
socket: /var/run/redis/redis.sock # Comment out this line if you want to use TCP or Sentinel
namespace: resque:gitlab
log_file: "/var/log/gitlab-shell/gitlab-shell.log"
log_level: INFO
audit_usernames: false
git_annex_enabled: false
</pre>
要注意的是這個檔案的空白、tab 會影響 parse 正確性,不要亂加空白。
然後還是跑不起來,發現 /usr/local/share/gitlab-shell/lib 少了 gitlab_reference_counter.rb
補給他:
<pre class="code prettyprint">
cd /usr/local/share/gitlab-shell/lib
fetch https://raw.githubusercontent.com/gitlabhq/gitlab-shell/master/lib/gitlab_reference_counter.rb
</pre>
重啟一次 service ,搞定。
Note1. 為什麼不用 pkg ?因為腦闆說 redmine 吃了很多要特別設定的 plugin ,ruby pkg 下去會爛光光。懶得確認狀況,不然我最近犯懶都習慣 pkg 到底了 XD
cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-35617245480798104172015-04-20T20:39:00.000+08:002015-04-20T20:39:22.312+08:00合併多個 Subversion 成一個 Git<h3>
</h3>
轉換成 Git 的方法可以看這篇,這篇其實是先轉成 git 後,然後用 git 合併起來<br />
<h2>
方法一:subtree add</h2>
<pre class="code prettyprint">git subtree add --prefix=DIR1 git://git.repo.1 master
git subtree add --prefix=DIR2 git://git.repo.2 master
git subtree add --prefix=DIR3 git://git.repo.3 master
git subtree add --prefix=DIR4 git://git.repo.4 master
</pre>
<br />
這是最簡單快速的方法,如果不介意看到一個新增目錄的 commit 出現的話。<br />
<br />
參考:<a href="http://stackoverflow.com/questions/1425892/how-do-you-merge-two-git-repositories">http://stackoverflow.com/questions/1425892/how-do-you-merge-two-git-repositories</a><br />
<br />
<h2>
方法二:cherry-pick</h2>
這個做法會改寫原來 repo 的歷史紀錄,所以先 clone 一份出來測試。
<br />
<pre class="code prettyprint">mkdir temp
cd temp
git svn clone svn://repo1/
git svn clone svn://repo2/
git clone /path/to/repo3
git clone /path/to/repo4
</pre>
然後到每個 repo 裡去調整目錄,這裡最簡單的作法是把它搬到某個 dir 裡:
<br />
<pre class="code prettyprint">git filter-branch --index-filter 'git ls-files -s | perl -pe "s{\t\"?}{$&SUB_DIR/}" |GIT_INDEX_FILE=$GIT_INDEX_FILE.new git update-index --index-info && if test -f "$GIT_INDEX_FILE.new"; then mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE; fi' HEAD
</pre>
參考:
<ul>
<li><a href="http://www.soa-world.de/echelon/2014/03/migrating-multiple-repositories-to-git.html">http://www.soa-world.de/echelon/2014/03/migrating-multiple-repositories-to-git.html</a></li>
<li><a href="http://serverfault.com/questions/420828/migrate-multiple-svn-repositories-into-single-git-repository">http://serverfault.com/questions/420828/migrate-multiple-svn-repositories-into-single-git-repository</a></li>
<li><a href="http://jeffreysambells.com/2010/09/13/a-little-bit-of-git-fu">http://jeffreysambells.com/2010/09/13/a-little-bit-of-git-fu</a></li>
</ul>
cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-73403244181526573022015-04-20T00:01:00.000+08:002015-04-20T00:41:45.528+08:00轉移 Subversion 到 Git<h3>
準備</h3>
<div>
安裝 git svn</div>
<div>
pkg install git-subversion-2.3.5</div>
<div>
<br /></div>
<h3>
建立對應的使用者列表</h3>
<div>
在 svn project 目錄下,轉出 author.txt
<br />
<pre class="code prettyprint"><code>svn log --xml | grep author | sort -u | perl -pe 's/.*>(.*?)<.*/$1 = /' > author.txt</code></pre>
把 author.txt 轉換成需要的格式如下:
<br />
<pre class="code prettyprint">john = john <john gmail.com="">
foo = foo <foo mgmail.com="">
kevin = kevin <kevin gmail.com="">
johnny = johnny <johnny gmail.com="">
</johnny></kevin></foo></john></pre>
</div>
<h3>
轉換 svn 到 git repo</h3>
<pre class="code prettyprint"> git svn clone --trunk=/ --no-metadata --authors-file=author.txt svn://svn.my.doman/SVN-REPO-NAME NEW-GIT-REPO.git
</pre>
這裡<b>強烈建議!強烈建議!強烈建議!</b> 不要過 http_dav_svn,就算沒跑 svnserve ,設定一下跑起來不過是五分鐘以內的事,可以省掉很多奇怪的問題,尤其是當你是陳年的 repo 不知道裡面塞了什麼鬼東西的時候。<br />
接下來砍站,把整個 repo 抓下來:
<br />
<pre class="code prettyprint"> git svn fetch
</pre>
如果你不聽話或是情非得已過 http_mod_dav 然後出錯了,那就重複跑到結束吧。<br />
<br />
<h3>
刪除過大檔案</h3>
<br />
現在 svn 已經成功的轉成 git 了,在 NEW-GIT-REPO.git,要把它丟上 github 了嗎?<br />
先別急,先砍一砍裡面太肥的檔案吧。<br />
Github 目前是超過 50 MB 會跳警告,大於 100 MB 會跳錯誤。<br />
所以參考<a href="https://help.github.com/articles/removing-files-from-a-repository-s-history/#removing-a-file-added-in-an-older-commit" target="_blank">官方網站</a>的說明,用 <a href="https://rtyley.github.io/bfg-repo-cleaner/" target="_blank">BFG</a> 來砍最簡單:<br />
<br />
<h4>
安裝 jre</h4>
<pre class="code prettyprint">pkg install openjdk8-jre-8.40.25_3
</pre>
<h4>
下載 bfg</h4>
<pre class="code prettyprint">fetch http://repo1.maven.org/maven2/com/madgag/bfg/1.12.3/bfg-1.12.3.jar
</pre>
<pre class="code prettyprint">
java -jar bfg-1.12.3.jar --strip-blobs-bigger-than 50M NEW-GIT-REPO.git/
git reflog expire --expire=now --all && git gc --prune=now --aggressive
</pre>
<h4>
塞上 github</h4>
去 github 上面把專案開好,然後照他給的下:
<br />
<pre class="code prettyprint">git remote add origin git@github.com:myORG/myProjectDir.git
git push -u origin master
</pre>
<h4>
萬一還是太大</h4>
如果你看到
<br />
<pre class="code prettyprint">Counting objects: 82461, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (29301/29301), done.
remote: fatal: pack exceeds maximum allowed size
error: pack-objects died of signal 132.00 GiB | 2.53 MiB/s
</pre>
代表這一次的 commit 還是超過大小,只好拆開來塞:<a href="https://abvi.wordpress.com/2013/08/09/moving-from-svn-to-github/">這裡有教你</a>這麼做:
<br />
<pre class="code prettyprint">git push -u origin HEAD~1000:refs/heads/master
git push -u origin HEAD~500:master
git push -u origin master
</pre>
不過我的 revision range 語法一直看不懂所以我改成
<br />
<pre class="code prettyprint">git push -u origin 某個commit的hash:refs/heads/master
git push -u origin 另外某個commit的hash:master
git push -u origin master
</pre>
因為 git push 後面給某個 commit 的意思是,把這個 commit 之前都 commit,所以分開塞就可以啦。
至於怎麼找這段呢,就:
<br />
<pre class="code prettyprint">git log --pretty=oneline
</pre>
萬一你發現,連塞一個 commit 都不行的話,那就恭喜你啦!!!那個 commit 太大啦....
想辦法把那個 commit 分解一下吧....<br />
<br />
<br />
<br />
<h3>
參考資料
</h3>
<div>
<br />
<ul>
<li><a href="http://shogo82148.github.io/blog/2014/09/13/github-remote-push-pack-size-exceeded/">http://shogo82148.github.io/blog/2014/09/13/github-remote-push-pack-size-exceeded/</a></li>
<li><a href="https://abvi.wordpress.com/2013/08/09/moving-from-svn-to-github/">https://abvi.wordpress.com/2013/08/09/moving-from-svn-to-github/</a></li>
<li><a href="https://abvi.wordpress.com/2013/08/09/moving-from-svn-to-github/">http://stackoverflow.com/questions/79165/how-to-migrate-svn-repository-with-history-to-a-new-git-repository</a></li>
</ul>
</div>
<div>
<br /></div>cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-59646125435063819822015-04-08T12:02:00.000+08:002015-04-08T12:02:23.131+08:00DDNS on FreeBSD 10最近種花電信在特價推 300M/100M ,於是弄了台 <a href="http://www.gigabyte.tw/products/product-page.aspx?pid=5118#ov" target="_blank">Brix GB-BXBT-1900</a> 來玩,對於這種小板子就是無法抗拒。題外話,在台中丟的是 <a href="http://www.gigabyte.tw/products/product-page.aspx?pid=4859#ov" target="_blank">GB-BXi3H-4010</a> 質感跟大小跟功能贏很多,當然比較貴一點點,不過有兩組 sodimm 跟 msata + HDD 還比較小台,唯一要注意的是沒有 D-SUB。<br />
<br />
家裡用的就沒特別去申請固定 IP ,然後種花電信又老奸巨猾, 100M 以上的故意不給請 PPPOE 配發的偽固定 IP。沒關係,沒做啥大事業,用 no-ip 搞定,結果沒想到第二天就 GG 了,根本就不知道配去哪根電線桿了,於是只好來自幹吧。<br />
<br />
目標:client 可以透過 bind 的 dynamic update 機制自動向 dns server 更新自己的 ip 。<br />
<br />
<a href="http://www.freebsdwiki.net/index.php/BIND,_dynamic_DNS" target="_blank">參考來源</a><br />
<br />
做法:<br />
<br />
<h3>
Server:</h3>
<br />
<pre class="code prettyprint">pkg install bind910
mkdir -p /usr/local/etc/namedb/keys
cd /usr/local/etc/namedb/keys
產生所需密鑰
dnssec-keygen -b 512 -a HMAC-SHA512 -v 2 -n HOST my.domain.
</pre>
vim /usr/local/etc/namedb/named.conf
<br />
<pre class="code prettyprint">key my.domain. {
algorithm "HMAC-SHA512";
secret "COPY FROM PRIVATE KEY";
};
zone "my.domain" {
type master;
file "../dynamic/zone.fwd.my.domain";
also-notify { SLAVE_DNS_IP;};
allow-transfer { SLAVE_DNS_IP;};
allow-update{
key my.domain;
};
};
</pre>
<h3>
Client:</h3>
<pre class="code prettyprint">pkg install bind-tools</pre>
把 Server 產的 Key 想辦法(用SCP)送回 client<br />
<pre class="code prettyprint">vim update.sh
#!/bin/sh
MYNS="host.my.domain"
NSSERVER="ns.my.domain"
KEY="KeyPATH.private"
NOW_IP=`ifconfig tun0 | grep inet | cut -d ' ' -f 2`;
OLD_IP=`nslookup -type=a $MYNS | tail -n 3 | grep Address | cut -d ' ' -f 2`;
if [ $OLD_IP != $NOW_IP ]
then
echo "update IP: $NOW_IP to DDNS Server"
echo "server $NSSERVER " >> /tmp/.ddns.$$
echo "update delete $MYNS. A " >> /tmp/.ddns.$$
echo "update add $MYNS. 30 A $NOW_IP" >> /tmp/.ddns.$$
echo "" >> /tmp/.ddns.$$
nsupdate -k $KEY < /tmp/.ddns.$$
rm /tmp/.ddns.$$
fi
exit 0
</pre>
<div>
然後 vim /etc/ppp/ppp.linkup </div>
<pre class="code prettyprint">
HiNET:
!bg /PATH_TO_THE_SCRIPT/updatens.sh
</pre>
當中 HiNET 是 /etc/ppp/ppp.conf 裡面對應的 Label
搞定收工。cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-30532460738113587452014-12-31T13:01:00.001+08:002014-12-31T13:01:29.380+08:00讓 OSX 下的 smbd follow symbolic links
在 /System/Library/LaunchDaemons/com.apple.smbd.plist 加上
<pre class="code prettyprint">
<array>
<string>/usr/sbin/smbd</string>
<string>-no-symlinks</string>
</array>
</pre>
然後
<pre class="code prettyprint">
$sudo launchctl unload /System/Library/LaunchDaemons/com.apple.smbd.plist
$sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.smbd.plist
</pre>cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-91180769541180739972014-12-05T12:53:00.004+08:002014-12-05T12:53:26.273+08:00在 OSX 下面開 samba照著說明手冊沿路開一開會發現沒辦法選 user ,也無法 smbpasswd -a 所以找了一下。<br />
連這種東西都需要密技的阿。
<br />
<br />
<pre class="code prettyprint">pwpolicy -u SomeUser -sethashtypes SMB-NT on
dscl . -passwd /Users/SomeUser "UserPassword"
</pre>
<br />
<a href="http://stackoverflow.com/questions/7824946/how-to-enable-user-account-smb-sharing-from-terminal-on-mac-os-x" target="_blank">來源</a>cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com1tag:blogger.com,1999:blog-6872749.post-65723647640842025212014-11-27T16:16:00.000+08:002014-11-27T16:16:05.139+08:00OSX 下的 ls color灰白的世界令人不喜悅。<br />
所以加點顏色吧,已經習慣的配色,假設有換 csh 在 .cshrc 裡面加上<br />
<pre class="code prettyprint">
setenv CLICOLOR 1
setenv LSCOLORS ExGxFxdxCxDxDxBxBxExEx
</pre>cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-74193909402174392772014-11-17T14:47:00.001+08:002014-11-17T14:50:41.828+08:00在 OSX 上開機後自動啟動 vs-mda-remote本來想得很簡單,應該是 /etc/rc.local 寫一下就好了沒想到還要轉一個大彎去用 launchd。<br />
<br />
其實也不難,只是要翻一下文件跟範例,有需要的就笑納吧。<br />
新增 /Library/LaunchDaemons/vs-mda-remote.plist
<br />
<br />
<pre class="code prettyprint"><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key><string>VsMdaAgent</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/node</string>
<string>/usr/local/bin/vs-mda-remote</string>
<string>--secure</string>
<string>false</string>
<string>--serverDir</string>
<string>/Users/VsMdaAgent/remote-builds/builds</string>
</array>
<key>KeepAlive</key><true>
<key>LaunchOnlyOnce</key><true>
<key>UserName</key><string>VsMdaAgent</string>
</dict>
</plist></pre>
然後測試一下:
<br />
<pre class="code prettyprint">啟動
launchctl load -F /Library/LaunchDaemons/tw.com.skymirror.vs-mda-remote.plist
停止
launchctl load -F /Library/LaunchDaemons/tw.com.skymirror.vs-mda-remote.plist
</pre>
看一下 /var/log/system.log 有沒有錯誤訊息,然後 netstat -an |grep 3000 看有沒有跑起來。重開看看運作正不正常。cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-59340498202907481052014-11-04T13:35:00.000+08:002014-11-04T13:35:41.418+08:00Mac mini server 2010 上 16G最近因為工作需要,回去把之前塵封已久的 Mac mini server 2010 拿出來重新整理。<br />
<br />
把主系統碟換上 SSD ,然後順便找了 16G (8G*2) 的 RAM 來換。<br />
<br />
結果沒想到 2011 可以用的 DDR3-1333 8G 裝上之後竟然是給逼逼逼。
但是裝一條卻能正常抓到 DDR3 1333 * 8G ,一整個很詭異。
排列組合下,插 8G(1333)+4G(1066),有時候是抓到 1333 8G 有時候是抓到 1066 12G ,就想是不是因為 > 8G 跑 1333 會有問題。
然後不小心看到 <a href="https://www.ptt.cc/bbs/MAC/M.1336814356.A.079.html" target="_blank">這篇</a> 所以就用了 <a href="http://www.softnology.biz/" target="_blank">Taiphoon burner</a> 把其中一條的頻率降成 1066,果然就搞定收工了。<br />
<br />
這麼說來,其實好像不太需要特別買 for apple 的,只要知道參數自己買時價的 memory 燒一燒就好了 (?)cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-40698685993207432162014-10-20T13:13:00.000+08:002014-10-20T13:13:10.197+08:00升級到 ruby 2.1 遇到 could not find a temporary directory 如果在升級 ruby 到 2.1 之後撞到這種錯誤訊息:
<br />
<pre class="code prettyprint">/usr/local/lib/ruby/2.1/tmpdir.rb:34:in `tmpdir': could not find a temporary directory (ArgumentError)
</pre>
就把 /tmp 的 <a href="http://en.wikipedia.org/wiki/Sticky_bit" target="_blank">Sticky bit</a> 加上去吧
<br />
<pre class="code prettyprint">chmod +t /tmp
</pre>
最近怎麼老是被 server 咬呢 :~~cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-36051484872287750282014-10-15T09:10:00.000+08:002014-10-15T09:10:04.912+08:00FreeBSD 上 uwsgi 的 Ruby plugin卡了一下,發現他其實不會編出 rack_plugin.so ,<a href="https://blog.twku.net/" target="_blank">老闆</a>說他是參考<a href="http://blog.icod.de/2013/06/09/redmine-uwsgi-nginx-on-freebsd/" target="_blank">這篇</a>做的,所以簡單說就是:<br />
<br />
<pre class="code prettyprint">
cd /usr/ports/www/uwsgi
make patch
vim work/uwsgi-2.0.7/buildconf/default.ini
make install clean
</pre>
這樣 uwsgi 就可以用 rack 惹
<br>
default.ini 目前長這樣:
<pre class="code prettyprint">
[uwsgi]
main_plugin = python,rack,gevent
inherit = base
</pre>cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-54064111771798529632014-07-31T14:59:00.000+08:002014-10-20T13:13:51.203+08:00解決 redmine 透過 sendmail 送信結果被 google 擋掉的方法本來是照著 redmine 官方的這篇 <a href="http://www.redmine.org/projects/redmine/wiki/EmailConfiguration#Simple-Login-Authentication-default-settings" target="_blank">EmailConfiguration</a> 做設定,後來不知道又為什麼死掉了,不小心看到直接把 sendmail 換成 SecureSSMTP 的<a href="https://wiki.freebsd.org/SecureSSMTP" target="_blank">方法</a>,就做個紀錄。<br />
<br />
從 redmine 的設定將 E-Mail 用 Google Apps 寄出:
<pre class="code prettyprint">
email_delivery:
delivery_method: :smtp
smtp_settings:
enable_starttls_auto: true
address: "smtp.gmail.com"
port: 587
domain: "your.domain"
authentication: :plain
user_name: "youraccount@your.domain"
password: "yourpassword"
</pre>
<br />
中間有個小插曲,因為 configuration.yml 的設定不可以用 tab ,而且有前後順序的問題,寫在上面的 production: 就是不會動,後來搬到 default: 裡面就好了。有遇到神秘現象的朋友可以看看是不是這問題。<br />
<br />
一勞永逸直接把 sendmail 換成 SSMTP 之後設定檔改成這樣:
<pre class="code prettyprint">
email_delivery:
delivery_method: :sendmail
sendmail_settings:
arguments: '-i'
</pre>
後看一看 maillog 有這常運作的話就可以收工了。
這樣總不會又被 google 把信丟到黑洞裡去了吧.....。cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-20739360556349104312014-07-29T10:40:00.000+08:002014-07-29T10:41:15.079+08:00解決 pkg 在舊版 FreeBSD 會 No valid repository found 的問題如果 FreeBSD 版本比較舊(這裡遇到的狀況是 9.2),就算裝了最新的 pkg 還是會吐 <span style="color: #484848; font-family: Verdana, sans-serif; font-size: 12px;">No valid repository found ,這時候就要:</span><br />
<pre class="code prettyprint">mkdir -p /usr/local/etc/pkg/repos
vim /usr/local/etc/pkg/repos/FreeBSD.conf
---
FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
mirror_type: "srv",
enabled: yes
}
---
</pre>
然後就可以愉快的使用 pkg 了。<br />
<br />
ref: <a href="https://wiki.koumbit.net/FreeBsdMaintenance#pkgng" target="_blank">here</a>cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-39429239815516068022014-07-17T09:48:00.000+08:002014-07-17T09:48:07.940+08:00Upgrade FreeBSD to 9.3-RELEASE當一個剛被放出來的笨蛋總要複習一下,乖乖地看 <a href="http://www.freebsd.org/releases/9.3R/relnotes.html#upgrade">Release Note</a> 跟 <a href="http://www.freebsd.org/releases/9.3R/installation.html#upgrade">HandBook</a><br />
<ul>
<li>升級現有 9.1 到 9.3<br />
<pre class="code prettyprint">
<span style="line-height: 1;">freebsd-update upgrade -r 9.3-RELEASE</span>
<span style="line-height: 1;">freebsd-update install</span>
</pre>
</li>
<li>更新 portmaster / pkg<br />
<pre class="code prettyprint"><span style="line-height: 1;">portmaster portmaster pkg</span></pre>
</li>
<li>更新所有套件<br />
<pre class="code prettyprint"><span style="line-height: 1;">portmaster -a</span></pre>
</li>
要注意的是 redmine 在更新的時候出現 ASCII-8BIT TO UTF-8 的問題,是因為偷懶直接用舊的設定檔。升級到 2.5.2 之後的 database adaptor 要換成 mysql2。
</ul>cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-48960284996057679862013-08-01T11:29:00.003+08:002014-10-20T13:14:07.447+08:00當 3ware SATA Raid 莫名其妙某個 drive 變成另一個 array 的處理方法NOTE 下來不然每次都要找半天...
<pre class="code prettyprint">
/c0/u1 del
/c0/u0 start rebuild disk=0 ignoreECC
</pre>cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-77143736043311137202013-06-19T17:13:00.000+08:002014-10-20T13:14:42.822+08:00Ubuntu 12.04 + valgrind 3.8.1Valgrind 3.8.0 開始支援 Intel 的 AVX ,但是 Ubuntu 12.04 上面還是 3.7.0 所以就得裝 ppa 上面的。<br />
<br />
照著<a href="https://launchpad.net/+help-soyuz/ppa-sources-list.html">這裡</a>做的話不會遇到太大問題。<br />
首先看哪個好心人有做對應版本的 package ,這裡找到 <a href="https://launchpad.net/~jtaylor/+archive/jtaylor">jtaylor</a>。<br />
然後就裝吧:<br />
<br />
<pre class="code prettyprint">apt-get install python-software-properties
add-apt-repository ppa:jtaylor/jtaylor
apt-get update
apt-get install valgrind
</pre>
<br />
打完收工。<br />
<br />cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-33033478852112328302013-06-11T19:07:00.000+08:002016-05-24T10:12:32.432+08:00nginx + smokeping with fastcgi on FreeBSD<h3>
緣起</h3>
<br />
一直以來都會用 Smokeping 來監視各個機房的對外網路狀況,但 Smokeping 全由 perl 寫成,在某次大搬風之後遺失了設定,所以只能暫時跑著 CGI mode。但是剛剛實在是太誇張的慢了,等到 proxy 一直 timeout ,所以就決定還是來把乖乖設定好吧。<br />
<br />
說來也有趣,當時的變動是把 lighttpd 換成 nginx,但不知道什麼原因,當時竟然為了要跑 smokeping 所以必須要借助 lighttpd 去跑 FastCGI 所以把 lighttpd 跑在 127.0.0.0:8080 然後用 nginx proxy 到 lighttpd,然後又好像 smokeping 的 FastCGI 哪裡沒設定好不會動,所以又只好變成了 在 lighttpd 上面跑 CGI mode (真的是脫褲子放屁加吃飽了撐著)<br />
<br />
<h3>
作法</h3>
<br />
大概看到有幾種方法讓 nginx 直接透過 FastCGI 處理 smokeping :<br />
1) 用 p5-CGI-SpeedyCGI (參考 <a href="http://bensonchang.pixnet.net/blog/post/1555945-smokeping-%E5%AE%89%E8%A3%9D%E8%A8%AD%E5%AE%9A">1</a>)<br />
2) 用 p5-Plack 透過 PSGI 來跑 perl-FastCGI (<a href="https://wiki.archlinux.org/index.php/Smokeping">參考</a>)<br />
3) 用 p5-FCGI 和 p5-FCGI-ProcManager 來跑 perl-FastCGI (<a href="http://blog.icelandic.net/2011/07/17/smokeping-on-nginx/">參考</a>)<br />
<br />
這邊是挑 2、3 來測,但 3 比較簡單一點也完工了,步驟大概是這樣:<br />
<br />
1) 安裝需要的套件
<br />
<pre class="code prettyprint">cd /usr/ports/www/p5-FCGI && make install clean
cd /usr/ports/www/p5-FCGI-ProcManager && make install clean
cd /usr/ports/www/spawn-fcgi && make install clean
</pre>
或是用 pkg :
<pre class="code prettyprint">
pkg install p5-FCGI p5-FCGI-ProcManager spawn-fcgi
</pre>
2) 編輯 smokeping 的 fastcgi wrapper,vim /usr/local/smokeping/htdocs/smokeping.fcgi 檔案如下:<br />
<pre class="code prettyprint"># -*-perl-*-
use FCGI;
use FCGI::ProcManager;
use lib qw(/usr/local/smokeping/lib);
use Smokeping 2.004002 ;
use CGI::Fast;
my $cfg = "/usr/local/etc/smokeping/config";
my $proc_manager = FCGI::ProcManager->new( {n_processes => 5} );
my $request = FCGI::Request();
$proc_manager->pm_manage();
while (my $q = new CGI::Fast) {
Smokeping::cgi($cfg,$q);
}
while($request->Accept() >= 0) {
my $q = new CGI::Fast;
$proc_manager->pm_pre_dispatch();
Smokeping::cgi($cfg,$q);
$proc_manager->pm_post_dispatch();
exit(0);
}
</pre>
<br />
3) 編輯啟動 fastcgi 的 script, vim /usr/local/smokeping/htdocs/spawn-smoke 檔案如下:<br />
<pre class="code prettyprint">#!/bin/sh
/usr/local/bin/spawn-fcgi -a 127.0.0.1 -p 你要的PORT\
-P /var/run/smokeping-fastcgi.pid -u www \
-f /usr/local/smokeping/htdocs/smokeping.fcgi
</pre>
<br />
4) 修改 nginx.conf ,增加 smokeping 的設定<br />
<pre class="code prettyprint">
location /smokeping/smokeping.cgi {
error_log /PATH_TO/smoke-error.log info;
access_log /PATH_TO/smoke-access.log combined;
fastcgi_pass 127.0.0.1:你要的PORT;
fastcgi_param SCRIPT_FILENAME /usr/local/smokeping/htdocs$fastcgi_script_name;
include fastcgi_params;
}
location /smokeping/ {
error_log /PATH_TO/smoke-error.log info;
access_log /PATH_TO/smoke-access.log combined;
alias /usr/local/smokeping/htdocs/;
}
</pre>
然後記得跑
<br />
<pre class="code prettyprint">
/usr/local/smokeping/htdocs/spawn-smoke
</pre>
之後再把 nginx 跑起來就沒問題了。
<br>
UPDATE:
要自動啟動的話 改 rc.conf
<pre class="code prettyprint">
spawn_fcgi_enable="YES"
spawn_fcgi_app="/usr/local/smokeping/htdocs/smokeping.fcgi"
spawn_fcgi_bindaddr="127.0.0.1"
spawn_fcgi_bindport="PORT"
</pre>
Update: slave 設定
<pre class="code prettyprint">
smokeping_enable="YES"
smokeping_flags="--master-url=http://MASTER.cgi --slave-name=SLAVENAME --cache-dir=/var/run/smokeping --shared-secret=SECRET"
</pre>
<strike>另外,如果要讓機器自動跑起來的話,我是直接偷改 /usr/local/etc/rc.d/smokeping :</strike>
<pre class="code prettyprint">
<strike>
# Define these smokeping_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/smokeping
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
# smokeping_flags="<set as needed>"
smokeping_enable=${smokeping_enable-"NO"}
smokeping_pidfile=${smokeping_pidfile-"/usr/local/var/smokeping/smokeping.pid"}
smokeping_fcgi_pidfile=${smokeping_fcgi_pidfile-"/var/run/smokeping-fastcgi.pid"}
smokeping_logfile=${smokeping_logfile-"/var/log/smokeping.log"}
smokeping_user=${smokeping_user-"smokeping"}
smokeping_group=${smokeping_group-"smokeping"}
. /etc/rc.subr
name="smokeping"
rcvar="smokeping_enable"
load_rc_config $name
command="/usr/local/bin/smokeping"
command_args="--logfile=${smokeping_logfile}"
pidfile="${smokeping_pidfile}"
fcgi_pidfile="${smokeping_fcgi_pidfile}"
extra_commands="reload"
reload_cmd="smokeping_reloadcmd"
start_precmd="smokeping_startprecmd"
stop_cmd="smokeping_stopcmd"
status_cmd="smokeping_statuscmd"
spawn_smokeping_fcgi="/usr/local/smokeping/htdocs/spawn-smoke"
smokeping_reloadcmd()
{
$command --reload
}
smokeping_statuscmd()
{
if [ ! -e $pidfile ];
then
echo "pidfile does not exist. $name is not running?";
exit 1;
fi
if pgrep -F $pidfile >/dev/null;
then
echo "$name is running.";
else
echo "$name is not running.";
exit 1;
fi
}
smokeping_stopcmd()
{
if pgrep -F $pidfile >/dev/null;
then
kill $sig_stop `cat $pidfile`;
wait_for_pids `cat $pidfile`;
kill $sig_stop `cat $fcgi_pidfile`;
wait_for_pids `cat $fcgi_pidfile`;
rm -rf $fcgi_pidfile;
else
echo "$name is not running.";
exit 1;
fi
}
smokeping_startprecmd()
{
if [ ! -e $smokeping_logfile ];
then
install -o smokeping -g smokeping /dev/null $smokeping_logfile || echo "ERROR: Could not initialize logfile at $smokeping_logfile.";
fi
if [ ! -e $fcgi_pidfile ];
then
$spawn_smokeping_fcgi;
echo "starting smokeping fastcgi";
fi
}
</strike>
</pre>cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0tag:blogger.com,1999:blog-6872749.post-66827430797817743922013-05-18T03:12:00.002+08:002013-05-18T03:12:57.785+08:00忘記 google play 的 keystore 密碼如果您跟小弟一樣患了老年痴呆,怎樣想也想不起來 Google Play 的 Keystore 簽章密碼,然後一 Google 發現這是一件非常嚴重的事情的時候,也許這個好心人寫的 「<span itemprop="name" style="background-color: white; color: #666666; font-family: arial, sans-serif; font-size: 24px;"><a href="https://code.google.com/p/android-keystore-password-recover/" style="color: #666666; text-decoration: none;">android-keystore-password-recover</a>」</span>可能可以讓你鬆一口氣 (如果密碼組成大概是有限區間的某些字串排列組合的話!)<br />
<br />
跑了兩個小時,但他並沒有幫我找到密碼(但不代表他不管用!)。<br />
<br />
因為當我覺得程式跑太慢,試圖修改程式以便更符合自己的密碼規則,然後開始思考該塞哪些 wordlist 的時候,不小心就被我想到原始的密碼了。cookyshttp://www.blogger.com/profile/09702599179464943141noreply@blogger.com0