- list packages upgradable
sudo apt update
sudo apt list --upgradable
- upgrade a specific package
sudo apt-get install --only-upgrade
#!/usr/bin/python3 | |
# -*- coding: UTF-8 -*- | |
import subprocess | |
import sys | |
import os | |
from os import listdir | |
import os.path | |
from os.path import isfile, join | |
import time |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#define AVCC_HEADER_OFFSET 4 | |
#define AVCC_NALU_LEN_UINT_SIZE_MINUS_1_MASK 0x3 | |
#define AVCC_HEADER_SPS_CNT_OFFSET 5 | |
#define SPS_CNT_MASK 0x1f | |
#define START_CODE_SIZE 4 |
## resize | |
```shell | |
convert dragon_sm.gif -resize 64x64 resize_dragon.gif | |
``` | |
## resize with ignoring sapect Raio | |
```shell | |
convert dragon_sm.gif -resize 64x64\! exact_dragon.gif | |
``` |
#!/usr/bin/python3 | |
# -*- coding: UTF-8 -*- | |
import json | |
import yaml | |
import datetime | |
import os.path | |
import os | |
with open('./notes.json', 'r') as json_file: |
## Reference | |
[Google doc](https://developer.android.com/reference/android/view/KeyEvent) | |
[stackoverflow](https://stackoverflow.com/questions/7789826/adb-shell-input-events) | |
## Keycode | |
``` | |
0 --> "KEYCODE_UNKNOWN" | |
1 --> "KEYCODE_MENU" | |
2 --> "KEYCODE_SOFT_RIGHT" |
sudo apt update
sudo apt list --upgradable
sudo apt-get install --only-upgrade
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "gdb", | |
"request": "attach", | |
"name": "Attach to arm64 linux", |
#!/bin/bash | |
INNER_KEYBOARD_ID=$(xinput list | grep "AT Translated Set 2 keyboard" | cut -f 2 | cut -d "=" -f 2) | |
INNER_KEYBOARD_STATUS=$(xinput list | grep "AT Translated Set 2 keyboard" | cut -f 3 | sed 's/\[//' |awk '{print $1}') | |
if [ $INNER_KEYBOARD_STATUS = "slave" ]; then | |
echo "floating..." | |
xinput float $INNER_KEYBOARD_ID | |
elif [ $INNER_KEYBOARD_STATUS = "floating" ]; then | |
echo "reattach..." | |
xinput reattach $INNER_KEYBOARD_ID 3 |
## use grep | |
``` | |
rm `ls | grep -v "file_name_wanted_to_be_kept"` | |
``` |
screenrecord --size 1280x720 --bit-rate 3000000 --time-limit 10 /sdcard/demo.mp4 |