Use when you add something entirely new. E.g. 🌟ADD: Add Git ignore file
Use when you improve/enhance piece of code like refactoring etc. E.g. 💡IMPROVE: Remote IP API Function
bash -c 'eval "echo \"$$(cat ~/temp.yml)\"" > ~/kong.yml |
#!/bin/bash | |
set -euo pipefail | |
# Directory setup | |
APP_DIR="${HOME}/Applications" | |
ICON_DIR="${HOME}/.local/share/icons" | |
DESKTOP_DIR="${HOME}/.local/share/applications" | |
BIN_DIR="${HOME}/.local/bin" |
from functools import wraps | |
from typing import Callable | |
import typer | |
from asyncio import run | |
class AsyncTyper(typer.Typer): | |
def async_command(self, _func: Callable = None, *args, **kwargs): | |
def decorator(async_func): | |
@wraps(async_func) |
dvc init | |
dvc remote add -d storage s3://yyy | |
dvc remote modify storage endpointurl https://xxx.r2.cloudflarestorage.com/ | |
# global | |
dvc remote modify --global storage endpointurl https://xxx.r2.cloudflarestorage.com/ | |
dvc remote modify --local myremote account_name 'myaccount' | |
dvc remote modify --local myremote account_key 'mysecret' |
@REM normal copy | |
robocopy "Source Directory" "Destination Directory" /e /w:5 /r:2 /COPY:DATSOU /DCOPY:DAT /MT:24 | |
@REM normal move | |
robocopy "Source Directory" "Destination Directory" /e /w:5 /r:2 /COPY:DATSOU /DCOPY:DAT /MT:24 /MOVE | |
@REM nfs copy | |
robocopy "Source Directory" "Destination Directory" /e /w:5 /r:2 /COPY:DATO /DCOPY:DAT /MT:24 /MOVE |
### Keybase proof | |
I hereby claim: | |
* I am wasdee on github. | |
* I am circleoncircles (https://keybase.io/circleoncircles) on keybase. | |
* I have a public key ASB2UB20JJrBpl-ONIch2glYEuGmKrii__0scS1G-y-5bAo | |
To claim this, I am signing this object: |
# check if use firewalld | |
if [ -x "$(command -v firewall-cmd)" ]; then | |
firewall-cmd --permanent --add-masquerade | |
fi |
#!/usr/bin/env bash | |
now=$(date +"%Y_%m_%d-%H_%M_%S") | |
top -b -n 120 > "top-120iters-$now.txt" | |
# this takes 120 iterations of top, which is 120*3 seconds = 6 minutes |
# https://docs.conda.io/projects/conda/en/latest/_downloads/843d9e0198f2a193a3484886fa28163c/conda-cheatsheet.pdf | |
conda env export --from-history > environment.yml | |
# to restore, must use with env cmd group https://github.com/conda/conda/issues/6827#issuecomment-365614464 | |
conda env create --file environment.yml | |
conda create -n env_name --file environment.yml #ERROR |