2021年6月29日 星期二

明家SL-2201防雷插座拆解

 人住在台南落雷密集鄉下處, 多年來已經被打壞不少次電視等設備,損失慘重,
電腦有UPS協防,但經常換了電視就忘了加防雷, 而且防雷應該要加在總開關處,還沒有時間可以處理, 而且家中N相和PE相是相接的,PE電阻又超大不太能用, 要不要多加TVS和氣體放電管都還要考慮, 一般防雷設計都要重新考量~

因此先買了一小批便宜"沒什麼路用"(防禦力很低)的產品來勉強擋一下遠距教學非得使用電腦時可能發生的輕微突波, 而落雷密集且可以不使用電氣時最好的還是要拔插頭~ 


因為有看到有人買了別的牌子110V裡面卻高達400伏才會作動(簡單的說就是中國220V貼牌充當的)

當然要看一下自己買到的是啥東西~




三角螺絲 剛好手邊有這種起子,難不倒~





膠帶我已經拆一半才想到要拍照, 原本是包得漂亮的.





包起來的是271 D10 J ,  D10 是直徑10mm , 271是27*10的1次方 =270伏特時崩潰, 就是110V的峰值抓120*根號2 * 1.5安全係數(抓剛好穩燒掉)  , J是指誤差x0%  (要查一下)



突波吸收功率如標示般70焦耳差不多, 不像有一些不良賣家(或是沒注意到的)標700焦耳,相差10倍.

也確實有包溫度保險絲,熔斷溫度120度C.



背板電路圖直接照畫如下:



整理後比較容易看懂~



拆開後用高溫(380度)的膠帶回黏 ,那種透明黃膠的膠帶(變壓器上常見)不知道可以耐幾度就是,  封好鎖上螺絲使用.


有時間看是要買做好的20kA (max40kA single shut)的數千元滑軌款式來另裝電箱 , 還是要自己買20D271K數個和溫度保險絲來慢慢黏花時間整自己節流省錢了.

2017年2月10日 星期五

github 同domain不同rsa key的設定方法

copy pasted from websites , copyright is not mine.


Generate a second key

Let’s say you already have an ssh key added to your personal github profile and now you want to add one to a work github account. First you may want to see how many ssh keys you have:
$ cd ~/.ssh
$ ls
id_rsa      id_rsa.pub
Currently you only have one public key. To generate a second one run:
$ ssh-keygen -t rsa -C "your_email@example.com"
This will create a new ssh key with the supplied email as a label. When prompted for a file enter a new file name, like ‘idrsasc’, otherwise it will try to override the already existing id_rsa key. When prompted for a passphrase, press enter (or choose a passphrase) and confirm. You know you’ve succeeded when you see something like this:
Your public key has been saved in /Users/jasminaatanassova/.ssh/id_rsa_sc.pub

Add identities to the keys.

加入剛才生成的rsa key的private key
$ ssh-add ~/.ssh/yourkey.rsa
檢查是否有成功加入
$ssh-add -l

Add ssh key to GitHub

Copy the second key you created to 剪貼簿 (可以用其他方式 指令不一定適用):
$ pbcopy < ~/.ssh/id_rsa_sc.pub
To add it to your work github account go to Account settings > SSH Keys. Click ‘Add SSH key’ and paste the key.
In the terminal cd into your work directory and run git pull to see if the key works. You should see an error like this:
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Add a config file

You need to add a config file which will tell github which shh key to use for which account. Add a config file in your .ssh directory with the following details:
#personal account
Host github.com
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa

#work account
Host github.com-work
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa_sc
Ensure that at least one account has a custom Host, in this example it’s the work one. Otherwise github defaults to the first one and as a result you may get the same access error from above.



接下來的超重要 是從另一篇剪過來的 是使用github的關鍵 因為github是同網址 會抓不到 要用這種方式去寫新的特殊的網址 (自訂字樣會被取代)



~/.ssh/config
    Host github-kc
        Hostname        github.com
        User git
        IdentityFile    ~/.ssh/github_rsa_kc.pub
        # LogLevel DEBUG3

    Host github-abc
        Hostname        github.com
        User git
        IdentityFile    ~/.ssh/github_rsa_abc.pub
        # LogLevel DEBUG3
Set remote url for repo:
  • For repo in Host github-kc:
    git remote set-url origin git@github-kc:kuchaguangjie/pygtrans.git
  • For repo in Host github-abc:
    git remote set-url origin git@github-abc:abcdefg/yyy.git

螢幕上下有黑邊 尺寸不對的解決方式

記得修改/boot/config.txt中的

hdmi_group = 1 or 2

使用hdmi_group =0 的自動模式 有時會辨識錯誤 要如上一般的強制指定

而且使用自動辨識模式 似乎會忽略其他設定

linux 把某目錄變成sudo 權限的方法



更改擁有者

sudo chown pi path

sudo chown pi ~/sudo_folder


或是更改檔案權限

chmod 776 target_file

chmod -R 776 target_folder

2016年6月10日 星期五

Win7 刪除檔案和複製檔案卡很久很慢的原因

1. NOD32是元凶(或其他款防毒軟體)! 移除NOD32改bitdefender就解決了
2.codec也有可能是問題 但不是我的情形
3. 記得先用安全模式測試 是軟體或硬體問題

2016年6月5日 星期日

快速備份和複製sd卡映像的軟體 DiskWriter ---win 32 disk imager

DiskWriter
win 32 disk imager

Raspbian 中文鍵盤正確設定方法

Raspbian 中文鍵盤正確設定方法

terminal 打 sudo raspi-config

在全球化選單裡面選其他鍵盤 選台灣語

請不要用圖形介面, 圖形介面有bug,不會儲存設定 ,重開機後設定會跑掉.