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
| if command -v cursor &> /dev/null; then | |
| export EDITOR="$(command -v cursor) --wait" | |
| export SUDO_EDITOR="$(command -v cursor) --wait" | |
| fi |
| #!/bin/bash | |
| # Not Tested, Generated by ChatGPT o1 | |
| # https://x.com/tiangolo/status/1839686032326836723 | |
| # Check if uv is in PATH | |
| if ! command -v uv &> /dev/null | |
| then | |
| echo "Error: uv is not installed or not in your PATH." | |
| echo "Please install uv before running this script." | |
| exit 1 |
| bash -c 'eval "echo \"$$(cat ~/temp.yml)\"" > ~/kong.yml |
| 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 |