夢幻天地blog
夢相隨,君。幻
2025年7月9日
2025年4月13日
ubuntu不使用snap安裝firefox
ubuntu改用snap雖然有很多優點,但我遇到了開機使用firefox會lag問題,很討厭。
雖然我用了apt install firefox裝回來,但下次一升級又改回snap版了,很煩。
找到方法改設定了 ,記錄一下
1.在snap移除snap,並清除乾淨。
sudo snap remove firefox
sudo rm -rf /var/lib/snapd/seed/snaps/firefox_*.snap
2.加入官方版的ppa
sudo add-apt-repository ppa:mozillateam/ppa
3.防止倉庫優先使用snap安裝firefox
echo '
Package: firefox*
Pin: release o=Ubuntu*
Pin-Priority: -1
' | sudo tee /etc/apt/preferences.d/firefox-no-snap
4.讓官方版自動更新
echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
5.安裝火狐
sudo apt update
sudo apt install firefox firefox-locale-zh-hant
2024年1月10日
osep_scratch切換鏡頭
記錄一下自已改的地方
src/lib/video/camera.js
在const requestStack = [];後面加上
/*add by chen 20221209 end */
在const requestVideoStream = videoDesc => {
let streamPromise;
後面加上
let video_value ={};
const webcamId= `${window.now_webcamId}`;
if (webcamId == "user"){
video_value = {facingMode: "user"};
} else if ( webcamId == "environment" ){
video_value = {facingMode: "environment"};
} else{
video_value = {deviceId: webcamId };
}
修改video: videoDesc為
video: video_value,
// video: videoDesc ,video:{facingMode: "user"}, {facingMode: "environment"},video:{deviceId: "xxxx" }
2023年11月20日
u8g2繁中字型
看了一篇文章,覺得不錯,把它實做了一下。
參考網址:https://www.kidsgo.net/u8g2/index.php
我轉換好的字型檔:https://drive.google.com/file/d/19Mw1fSSWmxFYSHbvg457jsi362sWJ0L6/view?usp=sharing
使用方法:
1.把字型檔和ino放在相同目錄
2.在ino中加入語法
#include <U8g2lib.h>
#include "u8g2_font_e58524b32706dda48e7107fc64bfd183.h"
U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
u8g2.setFont(u8g2_font_unifont_myfonts);
加入的中文字庫在說明文件中:https://docs.google.com/document/d/125J4c5W3LA7Bf7vy8gK1z82v_ekKfAIktCgZy0Krrls/edit?usp=sharing
2023年11月1日
google日曆連動line
參考網址 :https://happyplayblogs.blogspot.com/2021/09/line-notify-google.html
建立一個google script內容如下
申請一個line notify 權杖
//某一個月曆
2023年10月25日
2023年9月20日
ubuntu 下arduino ide無法寫入microbit磁碟機
錯誤訊息:
Open On-Chip Debugger 0.10.0-dev-00254-g696fc0a (2016-04-09-12:07)
解決方法:
cd /etc/udev/rules.d
sudo wget https://raw.githubusercontent.com/arduino/OpenOCD/master/contrib/60-openocd.rules
sudo udevadm control --reload-rules