diff --git a/codemods/package-lock.json b/codemods/package-lock.json index 5ef4975..89bf7d1 100644 --- a/codemods/package-lock.json +++ b/codemods/package-lock.json @@ -681,7 +681,7 @@ "dependencies": { "jsesc": { "version": "0.5.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true }, @@ -1009,7 +1009,7 @@ "dependencies": { "jsesc": { "version": "0.5.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true }, @@ -1315,7 +1315,7 @@ "dependencies": { "jsesc": { "version": "0.5.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true }, @@ -2722,7 +2722,8 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "" + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" } } }, @@ -4338,15 +4339,6 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -6301,14 +6293,6 @@ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -6421,21 +6405,9 @@ "dev": true }, "json5": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", - "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - } - } + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" }, "jsprim": { "version": "1.4.1", @@ -7674,7 +7646,8 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "" + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" } } }, diff --git a/dotenv/.zshrc b/dotenv/.zshrc index 6d42ca7..9dfef03 100644 --- a/dotenv/.zshrc +++ b/dotenv/.zshrc @@ -12,7 +12,7 @@ ZSH_THEME="avit" # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. -plugins=(git docker node npm z zsh-nvm zsh-autosuggestions zsh-syntax-highlighting) +plugins=(git docker node npm z zsh-autosuggestions zsh-syntax-highlighting) source $ZSH/oh-my-zsh.sh @@ -23,7 +23,3 @@ eval $(thefuck --alias) # Add RVM to PATH for scripting. Make sure this is the last PATH variable change. export PATH="$PATH:$HOME/.rvm/bin" - -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion diff --git a/dotenv/install.sh b/dotenv/install.sh index 716099f..86a8827 100644 --- a/dotenv/install.sh +++ b/dotenv/install.sh @@ -9,6 +9,7 @@ brew upgrade brew install --cask iterm2 ## dev tools +brew install git brew install git-lfs brew install --cask visual-studio-code brew install thefuck diff --git a/dotenv/server_install.sh b/dotenv/server_install.sh new file mode 100644 index 0000000..2446d21 --- /dev/null +++ b/dotenv/server_install.sh @@ -0,0 +1,15 @@ +# thefuck +sudo apt update +sudo apt install python3-dev python3-pip python3-setuptools +pip3 install thefuck --user + +# ohmyzsh +sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" +## plugins +git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions +git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting + + +# apply configs to $HOME +CURRENT_DIR=$(dirname "$0") +/bin/cp $CURRENT_DIR/.zshenv .zshrc $HOME/ diff --git a/pull-requester/commit-and-raise-pr.sh b/pull-requester/commit-and-raise-pr.sh new file mode 100644 index 0000000..6c7aa72 --- /dev/null +++ b/pull-requester/commit-and-raise-pr.sh @@ -0,0 +1,21 @@ +BRANCH_NAME="" +COMMIT_MSG="" +PR_BODY="" + +commit_and_push () { + git add -A + git commit -m "$COMMIT_MSG" + + git push -u origin $BRANCH_NAME +} + +raise_pr () { + gh pr create --title "$COMMIT_MSG" --body "$PR_BODY" +} + +main () { + commit_and_push + raise_pr +} + +main \ No newline at end of file diff --git a/pull-requester/create-branch-and-upgrade.sh b/pull-requester/create-branch-and-upgrade.sh new file mode 100644 index 0000000..09dbc5c --- /dev/null +++ b/pull-requester/create-branch-and-upgrade.sh @@ -0,0 +1,41 @@ +BRANCH_NAME="" +DEPENDENCIES=() + +prune () { + git checkout main + bash ../utils/git/prune.sh +} + +pull_and_checkout () { + git checkout main + git pull + + git checkout -b "$BRANCH_NAME" +} + +upgrade_dependencies () { + yarn + + for dependency in ${DEPENDENCIES[*]} + do + echo "Upgrading $dependency" + if grep -R "$dependency" "package.json" + then + yarn upgrade $dependency --latest + fi + done +} + +open_code () { + code . +} + + +main () { + prune + pull_and_checkout + open_code + upgrade_dependencies +} + +main diff --git a/pull-requester/upgrade-deps.sh b/pull-requester/upgrade-deps.sh new file mode 100644 index 0000000..967287a --- /dev/null +++ b/pull-requester/upgrade-deps.sh @@ -0,0 +1,25 @@ +REPOS=() + +source commit-and-raise-pr.sh +source create-branch-and-upgrade.sh + + +for repo in ${REPOS[*]} +do + echo ------------ + echo Repo: $repo + echo ------------ + + git clone "https://github.com/$repo.git" + cd $repo + + + prune + + pull_and_checkout + upgrade_dependencies + commit_and_push + raise_pr + + cd .. +done