Use any one of snippets from the following blocks
function ClickRefresh(){
console.log("Clicked on refresh button");
document.querySelector("paper-icon-button").click()
}
setInterval(ClickRefresh, 60000)
# anaconda | |
conda create -n myenv | |
conda create -n myenv python=3.9 | |
conda activate myenv | |
conda deactivate | |
conda env list | |
conda info --envs |
BIN_SEARCH PROC | |
;search in a sorted array by the binary search method | |
;input: SI = array offset address | |
; BX = number of elements | |
; CX = key | |
;output: SI = offset of sorted array | |
; AX = pos @where key has been found | |
;PUSH AX | |
PUSH BX | |
PUSH CX |
# Internet speed Test Check with speedtest-cli | |
curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python - | |
# Show free RAM | |
free -h | |
vmstat | |
# Show CPU config | |
lscpu |
#!/usr/bin/env python3 | |
# import shutil | |
import os | |
import sys | |
import re | |
from shutil import copyfile | |
dr = str(sys.argv[1]) | |
ext = str(sys.argv[2]) | |
dest = str(sys.argv[3]) |
#taken from this StackOverflow answer: https://stackoverflow.com/a/39225039 | |
import requests | |
def download_file_from_google_drive(id, destination): | |
URL = "https://docs.google.com/uc?export=download" | |
session = requests.Session() | |
response = session.get(URL, params = { 'id' : id }, stream = True) | |
token = get_confirm_token(response) |
# Common Contents of two text files ------------- | |
diff -y -w --strip-trailing-cr -i --minimal --color=always file1 file2 | grep -n -v'' "[|<>]" | |
diff --ignore-blank-lines --ignore-space-change --ignore-trailing-space --ignore-case --minimal --strip-trailing-cr --unchanged-group-format='@@ %dn, %df | |
%<' --old-group-format='' --new-group-format='' --changed-group-format='' file1 file2 | |
# ------------------------------------------- | |
# CSV like parsing | |
sed 's/,,/, ,/g;s/,,/, ,/g' data.csv | column -s, -t |
docker-compose build | |
docker-compose up | |
docker-compose down |
Mount remote linux server folder
\\sshfs\user@host/../../path_from_root/
# Handle line endings automatically for files detected as text | |
# and leave all files detected as binary untouched. | |
* text=auto | |
# Never modify line endings of our bash scripts | |
*.sh -crlf |