Skip to content

Commit

Permalink
dumb commit
Browse files Browse the repository at this point in the history
  • Loading branch information
andersonbosa committed May 4, 2024
1 parent d60d5a4 commit c1b5362
Show file tree
Hide file tree
Showing 7 changed files with 210 additions and 58 deletions.
44 changes: 39 additions & 5 deletions moshell.sh/custom/andersonbosa/ai_prompts.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
alias copy=clipcopy

function ai_pareto() {
# source: https://www.linkedin.com/feed/update/urn:li:activity:7079481200431480832?utm_source=share&utm_medium=member_desktop
# 1. Tire proveito do principio de Pareto na hora de estudar. Comando:
Expand Down Expand Up @@ -49,32 +51,32 @@ EOF

function ai_study_partner() {
local USER_INPUT=$1 # matéria ou tópico
cat <<EOF | cat
cat <<EOF | cat | copy
Ask a series of challenge-related questions related to $USER_INPUT to test my knowledge and improve my long term memory
EOF
}

function ai_create_history_from_topic() {
local USER_INPUT=$1 # matéria
cat <<EOF | cat
cat <<EOF | cat | copy
Turn central topics about $USER_INPUT into interesting stories or narratives so that I can remember and better understand this subject
EOF
}

function ai_create_activities_routine() {
local USER_INPUT=$1 # matéria
cat <<EOF | cat
cat <<EOF | cat | copy
Develop a routine of practical tasks for my $USER_INPUT studies, so as to focus on my weaknesses and with constant feedback for my evolution
EOF
}

function ai_git_commit() {
cat <<EOF | cat
cat <<EOF | cat | copy
You are to act as the author of a commit message in git. Your mission is to create clean and comprehensive commit messages in the conventional commit convention (based on https://www.conventionalcommits.org/en/v1.0.0/) and explain WHAT were the changes and WHY the changes were done. I'll send you an output of 'git diff --staged' command, and you convert it into a commit message.
For you to generate the correct output, also follow these rules:
* Do not preface the commit with anything.
- Do not preface the commit with anything.
* Add a short description of WHY the changes are done after the commit message. Don't start it with "This commit", just describe the changes.
* Use the present tense.
* Use the Conventional Commits specification (https://www.conventionalcommits.org/en/v1.0.0/)
Expand All @@ -89,3 +91,35 @@ $(git diff --staged)
EOF
}




function ai_git_commit_v2() {
cat <<EOF | cat | copy
You are to act as the author of a commit message in git. I'll send you an output of 'git diff --staged' command, and you convert it into a commit message. Your mission is to create clean and comprehensive commit message in the conventional commit convention (based on https://www.conventionalcommits.org/en/v1.0.0/) written in present tense for the following code diff with the given specifications below:
- Use the Conventional Commits specification (https://www.conventionalcommits.org/en/v1.0.0/)
- Message language: English (US)
- Commit message must be a maximum of 100 characters.
- Exclude anything unnecessary such as translation. Your entire response will be passed directly into git commit.
About the commit format, choose a type from the type-to-description items below that best describes the git diff:
- docs: 'Documentation only changes'
- style: 'Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)'
- refactor: 'A code change that neither fixes a bug nor adds a feature'
- perf: 'A code change that improves performance'
- test: 'Adding missing tests or correcting existing tests'
- build: 'Changes that affect the build system or external dependencies'
- ci: 'Changes to our CI configuration files and scripts'
- chore: "Other changes that don't modify src or test files",
- revert: 'Reverts a previous commit'
- feat: 'A new feature'
- fix: 'A bug fix'
\`\`\`diff
$(git diff --staged)
\`\`\`
EOF
}
90 changes: 88 additions & 2 deletions moshell.sh/custom/andersonbosa/aliases.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,96 @@
#!/bin/sh
#
# ALIAS HERE TO BE USED ELSEWHERE #
###################################

# INDEX #
#@fast config
#@exoterics
#@tinycuts
#@shortcuts
#@workrounds
#@random
#@one-liners


#@exports
export PATH=$PATH:/home/t4inha/.local/bin # export user binaries
export PATH=$PATH:/home/t4inha/.venv/bin # export python venv binaries


#@tinycuts
alias v="vim"
alias l="ls -lhv"
alias ll="ls -lahv"
alias t="tree -t -L 1"
alias tt="tree -t -L 2"
alias h="history"
alias lless="ccat | less"
alias work="cd $HOME/workspace ; l"
alias dev="cd $HOME/devspace ; l"
alias wit="cd $HOME/witchcrafts ; l"
alias doti="~/dotfiles/cli.sh"
alias tbu="nc termbin.com 9999"
alias tat="tmux attach"
alias hosts="sudo $EDITOR /etc/hosts"

alias copy="clipcopy"
alias k=kubectl
alias tf=terraform
alias kubectl="minikube kubectl -- "
alias k="minikube kubectl -- "
alias pn=pnpm
alias script="script --log-timing=typescript_log_timing -q "
alias ytd-hd="bash /home/t4inha/dotfiles/assets/youtube_downloader_hd.sh"
alias ytd="bash /home/t4inha/dotfiles/assets/youtube_downloader_mp4.sh"


#@exoterics
alias lenny="echo '( ͡° ͜ʖ ͡°)' | clipcopy"
alias rot13="tr 'A-Za-z' 'N-ZA-Mn-za-m'"
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'


#@pentesting
alias spellbook="$TOOLS_PATH/spellbook/spellbook.pl"
alias burl="curl -x $BURP_ENDPOINT -k"
alias restart-dns='sudo killall -HUP mDNSResponder'
alias tturbosearch="turbosearch --proxy $BURP_ENDPOINT -o turbosearch.log "
alias rustscan='docker run -it --rm --name rustscan rustscan/rustscan:1.10.0'
alias rustscan-docs="$BROWSER https://github.com/RustScan/RustScan#-usage"
alias wireshark-docs="$BROWSER https://www.wireshark.org/docs/wsug_html_chunked/"
alias wireshark-scripts="$BROWSER https://wiki.wireshark.org/Lua/Examples"

function pince() {

#@randoms
## in ZSH use docker compose plugin
#alias dol="docker compose logs -f"
#alias dou="docker compose up -d ; docker compose logs -f"
#alias dor="docker compose restart"
#alias dow="docker compose down"
#alias dost="docker compose start"
#alias dosp="docker compose stop"


#@one-liners
alias bashly='docker run --rm -it --user $(id -u):$(id -g) --volume "$PWD:/app" dannyben/bashly'


pince() {
local pince_dir_path="$HOME/tools/PINCE/"
echo "[+] Entering: $pince_dir_path"
cd $pince_dir_path
sh PINCE.sh
cd -
}

nodered_docker() {
# https://nodered.org/docs/getting-started/docker
docker run -it -p 1880:1880 -v $HOME/dotfiles/assets/data_nodered:/data --name mynodered nodered/node-red;
}

nodered_docker_backup() {
rm -rf -- $HOME/dotfiles/assets/data_nodered/backup
docker cp mynodered:/data $HOME/dotfiles/assets/data_nodered/backup
}

#source /snap/google-cloud-cli/229/completion.zsh.inc
4 changes: 3 additions & 1 deletion moshell.sh/custom/andersonbosa/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ function docker_get_ip() {
local CONTAINER_ID="$1"

docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $CONTAINER_ID
}
}


Loading

0 comments on commit c1b5362

Please sign in to comment.