最近跟ChatGPT一起合作(vibe coding),ChatGPT負責生成程式碼,我負責收集資料的來源並除錯與修改部份的程式碼(我本來就是QA人員這點我很熟門熟路),在這樣的開發背景下大幅降低了開發門檻與提高了開發速度!當然如果使用者本身具備一定的程式知識還可以受益良多。
我非常喜歡這樣的工作方式,也相信這是未來的走向。
Screenshots:
搭配crontab每日15:05執行並寫入log file.
最近跟ChatGPT一起合作(vibe coding),ChatGPT負責生成程式碼,我負責收集資料的來源並除錯與修改部份的程式碼(我本來就是QA人員這點我很熟門熟路),在這樣的開發背景下大幅降低了開發門檻與提高了開發速度!當然如果使用者本身具備一定的程式知識還可以受益良多。
我非常喜歡這樣的工作方式,也相信這是未來的走向。
Screenshots:
搭配crontab每日15:05執行並寫入log file.
之前一直想用Bottles+Wine在Ubuntu裝上三竹來看盤(沒錯~我暫時脫離了科技業,現在是個全職投資者),可是一直碰到問題而無法順利運行。
今天想想那就改用VirtualBox+Windows的老方案好了,不過安裝時碰到了2個問題在此紀錄一下。
問題:
1. Ubuntu OEM Kernel不支援virtualbox-dkms
Workaround: 切去generic Kernel就可以安裝好。
2. 要運行VirtualBox時遇到被KVM佔用住資源
Workaround:
sudo rmmod kvm && rmmod kvm-intel -> 失敗!想了一下原來是卡到multipass,所以把它先暫停
sudo snap stop multipass -> 成功
後記:
缺點是我不能同時使用multipass...... :(
Currently, Multipass does not provide a complete graphical interface for use like virtual machine software such as VMware or VirtualBox.
Of course, there are alternative solutions. You can connect to a Multipass instance using RDP, VNC, or X forwarding methods.
Here, I will use the X forwarding method, so when I need to use a GUI, I can launch the graphical interface of the relevant app from the CLI.
Step1. Create an SSH public key on your local machine
A long time ago, there was an introduction on how to use Ubuntu's Multipass. If you're interested, you can refer to the following link below:
https://go-linux.blogspot.com/2020/06/canonicalmultipass.html
Today, I'm here to introduce to you the enhanced version of Multipass (currently in the beta channel of Snap).
前幾天把舊X1的Ubuntu升級到22.04後體驗上還不錯,所以今天早上就把new X1也安裝了Ubuntu 22.04並且一樣保留Windows作業系統。(雙系統)
以下稍微紀錄一下我的步驟:
1. 關閉Windows的Bitlocker
2. 透過Windows內建的磁碟管理程式 -> 壓縮現有磁碟區 -> 分割出新的磁碟區 (之後裝Ubuntu)
3. 進入BIOS關閉Secure boot
4. 用Ubuntu 22.04的USB flash開機
5. 選擇保留Windows boot loader跟grub一起,並且把Ubuntu安裝到步驟#2的磁碟區
之後就很順利完工囉~ 這篇文章就是用new X1+Ubuntu打的 :D
今天把一台很久沒用的X1 laptop從Ubuntu 20.04.6 LTS升級到22.04.03之後,目前發現到兩個問題:
1. 無法使用gnome-terminal與terminator
爬了一下文看到很多人也遇到類似的問題,有人分享更改預設語言的方法然後重新開機並登入後可以解決,但我試了好幾次都失敗,後來發現當我開啟Settings -> Region & Language -> Manage Installed Languages之後視窗會直接crash,用Xterm直接執行gnome-terminal看到有error,最後死馬當活馬醫把我最懷疑的gcin移除掉並重新開機登入後gnome-terminal與terminator就正常了!沒想到這招有用!
2. 無法開啟Chrome
解決的方法就很簡單,重新下載並安裝吧!
wget -c https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get install -f
先這樣吧,之後有碰到其它問題的話會再陸續update~~
Hi, I'm back. It's been a long time since the last update. I'm curious, is anyone still reading the blog now? Very curious. :)
由於公司內部實在太多AP跟SSID了,在UC18 GNOME的環境一開NetworkManager scan wifi就會整個hang住,稍微研究了一下怎麼用nmcli的方式連上一個802.1X WLAN。
$ nmcli con add type wifi ifname <wifi interface> con-name <connection_profile> ssid <SSID>
$ nmcli connection edit id <connection_profile>
nmcli> set ipv4.method auto
nmcli> set 802-1x.eap peap
nmcli> set 802-1x.phase2-auth mschapv2
nmcli> set 802-1x.identity USERNAME
nmcli> set 802-1x.password PASSWORD
nmcli> set wifi-sec.key-mgmt wpa-eap
nmcli> save
nmcli> activate
搞定,收工。
$ sudo apt install snmptrapd
$ vi /etc/snmp/snmptrapd.conf
authCommunity log,execute,net public
$ sudo netstat -tupln | grep 162
udp 0 0 0.0.0.0:162 0.0.0.0:* 2100/snmptrapd
這裡我用CentOS8安裝Net-SNMP的基本工具snmptrap後,送出一個snmptrap example command.Step6. 檢查Ubuntu Server 18.04有沒有收到此event?# snmptrap -d -v 2c -c public 192.168.1.151 "" UCD-SNMP-MIB::ucdStart message s "/ disk utilization exceed 90%"
$ sudo tail -f /var/log/syslog | grep snmptrapMar 11 16:07:06 us18 snmptrapd[2100]: 2020-03-11 16:07:06[UDP: [192.168.1.132]:51067->[192.168.1.151]:162]:#012iso.3.6.1.2.1.1.3.0 = Timeticks: (194731) 0:32:27.31#011iso.3.6.1.6.3.1.1.4.1.0 = OID: iso.3.6.1.4.1.2021.251.1#011iso.3.6.1.4.1.2021.10.1.101 = STRING: "/ disk utilization exceed 90%"




$ sudo iw dev wlan0 interface add mon0 type monitor
$ sudo ifconfig mon0 up之後去啟動wireshark就會看到mon0 interface並透過它來抓802.11的封包了。
$ sudo apt update
$ sudo apt install snmp snmpd snmp-mibs-downloader
$ sudo vi /etc/snmp/snmpd.conf
# 允許all net來連線 (IPv4+IPv6)
agentAddress udp:161,udp6:[::1]:161
# SNMP v2:
rocommunity public default -V systemonly
# SNMP v3:
createUser ubuntu MD5 1234567890
rouser ubuntu
$ sudo systemctl restart snmpd
# SNMP v2
$ snmpwalk -v 2c -c public 127.0.0.1
# SNMP v3:
$ snmpwalk -v 3 -a MD5 -A 1234567890 -u ubuntu -l auth 127.0.0.1
zone "example.com" {
type master;
file "/etc/bind/db.example.com";
};
include "/etc/bind/zones.example.com";
$ systemd-analyze
Startup finished in 31.365s (firmware) + 5.287s (loader) + 16.686s (kernel) + 55.716s (userspace) = 1min 49.056s
graphical.target reached after 55.345s in userspace
$ systemd-analyze blame