筆電安裝win11不使用微軟帳號登入
安裝過程, 在連到無線網路階段, 請按下 “Shift+F10” 或者 “Shift+Fn+F10” , 並且輸入以下指令,就可以跳過網路連線,建立本機帳號並且使用win11囉
oobe\bypassnro
若是有線網路已取得ip, 可以拔除網路線, 或是使用以下指令清除網路設定
ipconfig/release
安裝過程, 在連到無線網路階段, 請按下 “Shift+F10” 或者 “Shift+Fn+F10” , 並且輸入以下指令,就可以跳過網路連線,建立本機帳號並且使用win11囉
oobe\bypassnro
若是有線網路已取得ip, 可以拔除網路線, 或是使用以下指令清除網路設定
ipconfig/release
網管人員學python, 看到虛擬環境,第六感覺得這很重要
windows:
pip3 install virtualenv
linux:
sudo pip3 install virtualenv
or
sudo apt install python3-virtualenv
virtualenv -p <python程式位置> <虛擬環境名稱>
or
sudo -p <python程式位置> <虛擬環境名稱>
#範例
windows :
virtualenv -p C:\Users\x\AppData\Local\Programs\Python\Python310\python.exe my-env
linux:
sudo virtualenv -p /usr/bin/python3 my-env
Linux:
source ./xxx/bin/activate
william@william-Inspiron-3891:~$ source ./my-env/bin/activate
(my-env) william@william-Inspiron-3891:~$
對於麻瓜來說, 這個世界上收發信軟體, 就只有 m$ 的outlook , 因公司ldap通訊錄橫跨三個不同語系,三個不同網域服務器, 導致outook 2013,2016,2019 , 查看簡體,越南文, 會出現亂碼, 當然中國麻瓜看繁體,越南文也一樣會出現亂碼
後來google一下, 發現windows 10, windows 11的語言與地區, 可以點選Beta,使用UTF8提供全球語言支援, 解決問題
解決方法如圖示
重開機之後, 就不會有亂碼了
去年安裝了moodle想要當作公司知識管理,沒多久就遇到資安問題,系統需要升級。
可是 moodle 網站 對於升級並沒有太多說明;反而有點誤導,似乎只要容器(container)更新到最新即可自動更新。
其實不是的
必須:
1、先在舊版容器進入維護模式,下載最新版程式,並且更新到最新,更新後離開維護模式
2、停用已升級完畢舊版容器
3、改用最新的images(套用原先的volume資料)
4、刪除舊容器
以下紀錄相關作法:
docker exec -it <container name> bash
apt update
apt install wget
wget --no-check-certificate https://download.moodle.org/download.php/direct/stable401/moodle-4.1.10.zip
#請注意/bitnami/moodledata 必須連到對應為volume
/bin/cp -R /bitnami/moodle /bitnami/moodledata
rm -rf /bitnami/moodle/*
apt install unzip
unzip xxx.zip
/bin/cp -R moodle/* /bitnami/moodle
Step 1: Get the updated image
$ docker pull bitnami/moodle:latest
Step 2: Stop the running container
Stop the currently running container using the command
#這部分有時候會停用失敗,請用docker stop 方式直接停用container
$ docker-compose stop moodle
Step 3: Take a snapshot of the application state
Backup your container 要備分(我之前有做了)
Step 4: Remove the currently running container
Remove the currently running container by executing the following command:
docker-compose rm -v moodle
Step 5: Run the new image (修改yml裡面moodle版本->到最新)
Update the image tag in docker-compose.yml and re-create your container with the new image
$ docker-compose up -d
最近升級moodle到4.0.1版本, 發現有問題, 想用回舊版, 發現舊版的變成 moodle:<none> , 這樣一來不就不能使用舊版了, 後來發現只要知道舊版images id , 就可以改成想要的tag, 也就能繼續使用了
docker tag <images id> <images name>:x.x
docker tag 43b9473f010d bitnami/moodle:3.10
最近遇到android app若要正式上架, 得製作隱私權宣告頁面
而這隱私權又要弄很多語系怎辦, 這時候就要在宣告中加上翻譯功能了
<script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en',
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
}, 'google_translate_element');
}
</script>
<script src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<div id="google_translate_element"></div>
includedLanguages: 'zh-CN,zh-TW',
原本我建議大家不要用灰名單, 原因是:
1. 等很久,
2. 系統自動發信,無法通過灰名單測試, 但是該信件又是極其重要
因此建議停用灰名單功能.
但近年來廣告信,釣魚信多到影響資通安全, 我們就必須要開啟灰名單功能, 策略如下:
1.若是重要信件,先加入灰名單裡面的白名單,
2.若通過灰名單測試後, 可以設定成長時間不用再通過灰名單測試
以下是rspamd開啟灰名單功能
enabled = true;
expire = 365d; # 1 day by default
timeout = 5min; # 5 minutes by default
# 若郵件高於4分, 就觸發灰名單功能
greylist = 4;# Apply greylisting when reaching this score (will emit `soft reject action`)
好多種版本, 終於找到可以用的
val email_intent = Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:"));
email_intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
email_intent.putExtra(Intent.EXTRA_EMAIL, arrayOf("your@email.com"))
email_intent.putExtra(Intent.EXTRA_SUBJECT, "問題回報");
email_intent.putExtra(Intent.EXTRA_TEXT,"");
try {
startActivity(Intent.createChooser(email_intent, "請選擇郵件軟體"))
}catch (e:ActivityNotFoundException){
Toast.makeText(myactivity, "請確認並設定好郵件收發軟體", Toast.LENGTH_LONG).show()
}
val email_intent = Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:")).apply {
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
putExtra(Intent.EXTRA_EMAIL, arrayOf("your@email.com"))
putExtra(Intent.EXTRA_SUBJECT, "問題回報")
putExtra(Intent.EXTRA_TEXT, "")
}
try {
startActivity(Intent.createChooser(email_intent, "請選擇郵件軟體"))
} catch ( ex: ActivityNotFoundException) {
Toast.makeText(myactivity, "請確認並設定好郵件收發軟體", Toast.LENGTH_LONG).show()
}