Accept Android SDK licenses from cli

The way to accept license agreements from the command line has changed. You can use the SDK manager which is located at: $ANDROID_HOME/tools/bin e.g: ~/Library/Android/sdk/tools/bin Run the sdkmanager as follows: ./sdkmanager –licenses And accept the licenses you did not accept yet (but need to).

Docker recreate

Reset all containers and images (DANGER) docker-compose rm –all && docker-compose pull && docker-compose build –no-cache && docker-compose up -d –force-recreate Rebuild the container docker-compose down && docker-compose up -d –build

Fix WiFi LG G5 misc partition

Command to safely get out of stuck TWRP would need to be updated for the G5: dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc that would help some people stuck in TWRP (wont help those stuck in download mode.. they should just successfully flash a TOT/KDZ to stop phone from booting into download mode). And it may… Continue reading Fix WiFi LG G5 misc partition

Published
Categorized as Android

Python Daemon

There can only be one daemon process running: that is managed by the PID lock file, like most other Linux daemons. To stop it, do kill `cat /var/run/eg_daemon.pid` To see if it is running: ps -elf | grep `cat /var/run/eg_daemon.pid` Using the pidfile submodule, the PID file is managed automatically. When the daemon is stopped,… Continue reading Python Daemon

Control Arduino from Raspberry Pi with pyFirmata

Requirements Raspberry Pi with Raspbian OS installed in it Arduino Uno or any other Arduino board Arduino USB cable LED   Installing PyFirmata in Arduino using Raspberry Pi To upload PyFirmata firmware in Arduino, we have to install Arduino IDE in Raspberry Pi. Follow these steps to install: Step 1:- Connect the Raspberry Pi to… Continue reading Control Arduino from Raspberry Pi with pyFirmata

Arduino and cpp files

You can create an Arduino project in which you have a main .ino file with setup() and loop(), but all the stuff in .h and .cpp files.

Simple debounce.js function minified

export default function debounce(a,b,c){var d,e;return function(){function h(){d=null,c||(e=a.apply(f,g))}var f=this,g=arguments;return clearTimeout(d),d=setTimeout(h,b),c&&!d&&(e=a.apply(f,g)),e}}