A list of quick commands to take screenshot, share video or record for Android
adb exec-out screencap -p > screen.png
echo nameserver 1.1.1.1 > /etc/resolv.conf | |
apk add --no-cache alpine-sdk bash libstdc++ libc6-compat npm libx11-dev libxkbfile-dev libsecret-dev zsh curl | |
vi /etc/passwd # replace ash with zsh for root | |
#wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash | |
#echo "nameserver 1.1.1.1 > /etc/resolv.conf" >> .zshrc | |
#echo "export NVM_NODEJS_ORG_MIRROR=https://unofficial-builds.nodejs.org/download/release" >> .zshrc | |
#echo "export NVM_IOJS_ORG_MIRROR=https://example.com" >> .zshrc | |
#echo "nvm_get_arch() { nvm_echo \"x64-musl\"; }" >> .zshrc | |
#source .zshrc | |
#exit |
# first day of the month | |
if [ "$(date +%d)" = 01 ]; then command; fi | |
# 15th day of the month | |
if [ "$(date +%d)" = 15 ]; then command; fi |
# cpu throttle | |
sudo apt install git build-essential python3-dev libdbus-glib-1-dev libgirepository1.0-dev libcairo2-dev python3-venv python3-wheel | |
git clone https://github.com/erpalma/lenovo-throttling-fix.git | |
sudo ./lenovo-throttling-fix/install.sh | |
sudo systemctl stop thermald.service | |
sudo systemctl disable thermald.service | |
sudo systemctl mask thermald.service |
# custom IntelliJ IDEA VM options | |
-Xms1024m | |
-Xmx2048m | |
-XX:ReservedCodeCacheSize=256m | |
-XX:+UseCompressedOops | |
-Dfile.encoding=UTF-8 | |
-XX:+UseConcMarkSweepGC | |
-XX:SoftRefLRUPolicyMSPerMB=50 | |
-server |
A quick cheatsheet of useful snippet for Flutter
A widget is the basic type of controller in Flutter Material.
There are two type of basic Widget we can extend our classes: StatefulWidget
or StatelessWidget
.
StatefulWidget are all the widget that interally have a dynamic value that can change during usage. It can receive an input value in the constructor or reference to functions. You need to create two classes like:
docker-compose pull | |
docker-compose up -d |
Install Conda
Install Cuda 8 ( https://developer.nvidia.com/cuda-toolkit-archive )
Install cuDNN
Setup cuDNN
cd ~/Downloads/cuda
sudo cp include/* /usr/local/cuda/include/
sudo cp lib/* /usr/local/cuda/lib/