Allen's memo

星期一, 3月 27, 2023

Cursor 試用心得

利用時間試用了一下 Cursor(https://www.cursor.so/),使用的是最近開發BLE專案用到的開源代碼 pc-ble-driver-py (https://github.com/NordicSemiconductor/pc-ble-driver-py)

pc-ble-driver-py主要是拿來 nrf Connect for Desktop 做不到的功能,開發客製DFU升級工具程式。

心得: 

測試一: prompt: provide the caller & callee relation chart

感覺是有產生出物件的說明

The code does not include a caller and callee relation chart. However, we can infer the relationship between the various classes and objects based on their usage in the code. The BSCollector class is the main class that manages the BLE driver and adapter, and is responsible for calling methods on the other classes and objects as needed. The BLEDriverObserver and BLEAdapterObserver classes are used to observe events from the BLE driver and adapter, respectively, and are called by the BSCollector class. The `BLEGapScanParams`, `BLEGapSecParams`, `BLEGapSecKDist`, and BLEUUID classes are used to define various parameters for the BLE connection, and are used by the BSCollector class when scanning for devices and connecting to them. The EvtSync class is used to synchronize events between the BLE driver and adapter, and is used by the BSCollector class to wait for events from the device. Finally, the Queue class is used to manage a queue of connections to the device, and is used by the BSCollector class to store connections to the device.

測試二:

prompt: if i need to add disconnect handle, how to do it?

第一感覺被嚇到,這麼聰明嗎? 但,搜尋了一下代碼,發現這是原本就有的參考範例。

測試三:

試著用 Attempt Change 套用到我的測試代碼裡,發現就給些很無用的建議了

感想:

從無到有的生成,其實已經相對成熟。 但如果要在已經既有的代碼專案裡面,給修改指導,其實還在很初階的階段。

星期一, 11月 28, 2022

GCP ACE認證資料參考

 GCP ACE認證


https://zhuanlan.zhihu.com/p/478981425


https://liuyuchen777.github.io/2022/02/20/ACE-Prepare-Note/


https://github.com/kibablu/associate-cloud-engineer


https://ravikirans.com/gcp-associate-cloud-engineer-exam-study-guide/

線上課程
https://www.udemy.com/course/google-cloud-certification-associate-cloud-engineer/

https://www.udemy.com/course/google-certified-associate-cloud-engineer-2019-prep-course/

星期四, 6月 23, 2022

Build openwert in docker

 Build openwert in docker


docker run -itd \

    --name lede-build \

    -h r6525 \

    -p 10022:22 \

    -v ~/firefly_openwrt:/home/user/firefly_openwrt \

    p3terx/openwrt-build-env:18.04


docker exec -it lede-build zsh


missing apps

    sudo apt install repo

    sudo apt install bison

    sudo apt install bc

    sudo apt install liblz4-tool

    sudo apt install time


星期二, 6月 07, 2022

How can I tell Ubuntu to do nothing when I close my laptop lid?

 

Ubuntu  21.10

/etc/systemd/logind.conf
    HandleLidSwitch=ignore
    sudo systemctl restart systemd-logind

Ubuntu 20.04

/etc/UPower/UPower.conf

   IgnoreLid=true

    sudo systemctl restart upower

星期日, 6月 05, 2022

HOW TO MOVE DOCKER DATA DIRECTORY TO ANOTHER LOCATION ON UBUNTU

https://www.guguweb.com/2019/02/07/how-to-move-docker-data-directory-to-another-location-on-ubuntu/

星期三, 4月 06, 2022

 

Installing Nextcloud on a Raspberry Pi with docker


I found a good reference on https://github.com/chrisbeardy/nextcloud-docker-raspberrypi-tutorial

星期四, 12月 27, 2018

Prevent .vmem file created

VMWare guest on SSD, prevent .vmem files created

prefvmx.minVmMemPct = "100"
MemTrimRate = "0"
mainMem.useNamedFile = "FALSE"
sched.mem.pshare.enable = "FALSE"
prefvmx.useRecommendedLockedMemSize = "TRUE"