Posts

How to download all files from directory

Image
You can use wget command or gui wget for download files from website Reference [1] wget download

How to upgrade mariadb from 10.1 to 10.2

Reference https://stackoverflow.com/questions/44027926/update-xampp-from-maria-db-10-1-to-10-2

How to debug msbuild

To do trace in msbuild 1. using message text <Target Name = "MyTarget" > <!-- Some tasks --> <Message Text = "The value of SomeVariable is: $(SomeVariable)" Importance = "High" /> <!-- Some tasks --> </ Target> 2. Let visual studio is able to display verbose message To change the build output verbosity shown in the VS2010 window, open the Options dialog and select the Build and Run settings below the Projects and Solutions node. Unless you explicitly specify a low message importance, your messages should show up at Normalverbosity or higher. Reference [1] Debug msbuild [2] No switch /debug [3] Get message msbuild task

generate type declaration file (.d.ts) on visual studio code

To compile typescipt use following command 1. Open command line 2. Go to current project 3  >"C:\Program FIles (x86)\Microsoft SDKs\Typescript\2.3\tsc" -d -p "./scripts/typings" -outDir "./scripts/typings/jaa" Note -d means Generates corresponding .d.ts file -p means a directory path to a directory containing a tsconfig.json file --outDir means Redirect output structure to the directory. -------------------------------------------- tsconfig.json {   "compilerOptions": {     "target":"es5",     "module":"commonjs",     "declaration":true,     "removeComments": true,     "strict": true   },   "include":[      "D:/xxx/xxx/xx/scripts/typings/**/*"   ],   "files":[      "D:/xxx/xxx/xx/app/utility/yyy.ts",      "D:/xxx/xxx/xx/app/utility/zzz.ts"   ] } -------------------------------------------- Refe...

Node-Red and MQTT on Raspberry Pi

Image
Node-Red MQTT on Raspberry Pi Node Red A visual tool for wiring the IoT. Gateway to The IoT. Rapidly developing popular platform device data information. To install Node-Red > bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered) > node-red-start After this you can access the node-red dashboard from url http://<raspberrypi ip addr>:1880 Auto Start on Reboot > sudo systemctl enable nodered.service Install MQTT Broker > npm install node-red-contrib-mqtt-broker Reference [1] Install Node-Red  [2] Install node-red-contrb-mqtt-broker [3] First time mqtt-broker MQTT Publish Getting started install MQTT client > sudo pip install paho-mqtt Note: GPIO. Stands for " General Purpose Input/Output ."  MQTT stands for "Message Queue Telemetry Transport"

M5Stack ESP32

Image
1. use uPyCraft https://randomnerdtutorials.com/install-upycraft-ide-windows-pc-instructions/ 2. Tools > Burn Firmware -  m5stack-20180516-v0.4.0.bin Connect to Putty 1. Open Putty 2. Select 'Serial' Connection 3. Port: COM7, Speed 115200 4. exec(open('./main.py').read(),globals()) M5Cloud How to make it connect to wifi 1. Burn with M5Cloud firmware https://github.com/m5stack/M5Cloud/tree/master/firmwares 2. Connect to wifi using  http://192.168.4.1/ 3. Add device via  http://io.m5stack.com M5 UI-Flow 1 Instruction https://medium.com/mmp-li/m5stack-with-ui-flow-b6d1a37385b0  1.1 How to burn firmware  https://docs.makerfactory.io/m5stack/related-documents/burn-firmware/  1.2 M5Burner  https://github.com/m5stack/M5Stack-Firmware Arduino 1 Install Arduino IDE - [1] arduino ide - [2] arduino on vscode 2. Install ESP32 board on Arduino IDE https://randomnerdtutorials.com/installing-the-esp32-board-...

Setup Raspberry PI

1. install raspberrian image into micro sd card Note: I used '2018-11-13-raspbian-stretch.img' via balenaEtcher 2. In case you don't have external keyboard but you have mouse. It needs to set wifi ssid/password via config file.     - Create file 'wpa_supplicant.conf' and add text as following into the file and save it to microsdcard country=US ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={  ssid="wifissid"  scan_ssid=1  psk="wifipassword"  key_mgmt=WPA-PSK } 3. Turn on ssh via create ssh file or use raspberry destop > preference config 4. If you need to write down a python code related bluetooth. You need to install bluepy > sudo apt-get install python-pip libglib2.0-dev > sudo pip install bluepy > sudo hcitool lescan  //get mac address Reference [0] How to install raspberry [1] Install Bluepy [2] Raspberry Document [3] Startup Bluetooth on Raspberry PI