diff --git a/scripts/bin/deploy-npm b/scripts/bin/deploy-npm new file mode 100755 index 0000000..12eda6f --- /dev/null +++ b/scripts/bin/deploy-npm @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Stop on error +set -e + +# Check if package.json is present +[[ ! -f "package.json" ]] && echo "package.json not found, please make sure you're in the correct path" && exit -1 + +# Deploy npm +npm publish \ No newline at end of file diff --git a/scripts/bin/deploy-pypi b/scripts/bin/deploy-pypi new file mode 100755 index 0000000..b62bb6c --- /dev/null +++ b/scripts/bin/deploy-pypi @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# Stop on error +set -e + +# Check if setup.py is present +[[ ! -f "setup.py" ]] && echo "Setup.py not found, please make sure you're in the correct path" && exit -1 + +# Remove old build +rm -rf dist +rm -rf build + +# Build +python setup.py sdist bdist_wheel + +# Check built files +twine check dist/* + +# Upload +twine upload dist/* \ No newline at end of file diff --git a/scripts/python/git-switch.py b/scripts/bin/git-switch similarity index 94% rename from scripts/python/git-switch.py rename to scripts/bin/git-switch index 7bd4477..53c444e 100755 --- a/scripts/python/git-switch.py +++ b/scripts/bin/git-switch @@ -10,6 +10,8 @@ print(f'Current url: {url}') if url.startswith('http'): print('> HTTP git remote detected, switching to SSH') repo = url.split('github.com/')[-1] + if repo.endswith('.git'): + repo = repo[:-4] print(f'> Repo detected: {repo}') new_url = f'git@github.com:{repo}.git' diff --git a/scripts/zshrc.sh b/scripts/zshrc.sh index 65fcd74..b067a1e 100755 --- a/scripts/zshrc.sh +++ b/scripts/zshrc.sh @@ -36,9 +36,8 @@ alias dc='docker-compose' alias vsucode='sudo code --user-data-dir /root/.config/vscode --no-sandbox' alias gpu-temp='while sleep 1; do clear; gpustat; done' alias cpu-temp='s-tui' -# alias mine='nuxhashd --show-mining' alias mine='sudo lolminer --algo ETHASH --pool stratum+ssl://daggerhashimoto.auto.nicehash.com:443 --user=3AcCeSHHwWJRf945iKCbxZ8cjUvy7Tmg3g.Daisy-lol' -# alias mine-zel='sudo lolminer --algo ZEL --pers BgoldPoW --pool stratum+tcp://zelhash.auto.nicehash.com:9200 --user=3AcCeSHHwWJRf945iKCbxZ8cjUvy7Tmg3g.Daisy-lol' +alias mine-zel='sudo lolminer --algo ZEL --pers BgoldPoW --pool stratum+tcp://zelhash.auto.nicehash.com:9200 --user=3AcCeSHHwWJRf945iKCbxZ8cjUvy7Tmg3g.Daisy-lol' alias mount-external='sudo mount -t cifs //192.168.2.1/external /smb/external -o rw,user=azalea,uid=1000,gid=1000,pass=' alias ds-clean="sudo find ./ -name \".DS_Store\" -depth -exec rm {} \;" @@ -46,7 +45,7 @@ alias ds-clean="sudo find ./ -name \".DS_Store\" -depth -exec rm {} \;" alias catt="echo 🐱" alias update-ssh-keys="curl -L https://github.com/Hykilpikonna.keys > ~/.ssh/authorized_keys" -export PATH="$SCR/python:$PATH" +export PATH="$SCR/bin:$PATH" # Lisp wrapper lisp() {