- Install Basic
sudo apt install vim git tig htop
- Git cz-cli (Ref)
| import 'package:flutter/material.dart'; | |
| class CustomActionPage extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar(title: Text("Custom Action Page")), | |
| body: Center( | |
| child: CustomActionButton( | |
| doAction: openDialog, |
| #!/bin/bash | |
| NAME=flowerd | |
| DESC="flower daemon" | |
| PIDFILE=./$NAME.pid | |
| PIPENV_VENV_PATH=`pipenv --venv` | |
| FLOWER="$PIPENV_VENV_PATH/bin/celery flower" |
| import serial | |
| FLAG = 0x7E | |
| HEX_NUMBER = 0xFF | |
| HEX_NUMBERS = [0xFF, 0x15] | |
| # INT <---> STRING(hex) | |
| print(FLAG, type(FLAG)) # 126 <class 'int'> | |
| print(hex(FLAG), type(hex(FLAG))) # 0x7e <class 'str'> | |
| print(int(hex(FLAG), 16)) # 126 |
| d = {'Bobson': 20, 'Bob': 22, 'Lin': 33} | |
| # filter by key | |
| d2 = {k : v for k,v in filter(lambda t: t[0] in ['Bobson', 'Lin'], d.items())} | |
| print('d2 = ', d2) | |
| # filter by value | |
| d3 = {k : v for k,v in d.items() if v in [22, 33]} | |
| print('d3 = ', d3) |
| set nu | |
| set bg=dark | |
| if has("autocmd") | |
| au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif | |
| endif | |
| call plug#begin('~/.vim/plugged') |
sudo apt install vim git tig htop
| import time | |
| from datetime import datetime, timedelta | |
| print('------------------------------------') | |
| # Get now timestamp & datetime | |
| now_dt = datetime.today() | |
| print('Now datetime is:', now_dt) |
| import time | |
| import hashlib | |
| serial = 'QQ0001' | |
| if __name__ == '__main__': | |
| now_time = time.time() | |
| print(now_time) | |
| h1 = hashlib.sha1() | |
| h1.update((str(now_time) + serial).encode('utf-8')) |
| // html code | |
| // <a href="#" class="btn btn--white">Button</a> | |
| $color-grey-dark: #777; | |
| $color-white: #fff; | |
| $color-black: #000; | |
| html { | |
| // Let 1rem = 10px | |
| font-size: 62.5%; |