Skip to content

Instantly share code, notes, and snippets.

View jottenlips's full-sized avatar
🌈

John Ottenlips Franke jottenlips

🌈
View GitHub Profile
@jottenlips
jottenlips / gitupstream.sh
Created October 2, 2020 21:59
Push to the upstream of your branch even if it does not exist remote.
alias branch='git symbolic-ref --short HEAD'
alias upstream='git push --set-upstream origin $(echo $(branch))'
# use
# cd some_project
# upstream
@jottenlips
jottenlips / ignore.sh
Last active November 8, 2022 18:05
Add a line to your .gitignore file.
ignore() {
echo "\n$1" >>.gitignore
echo "added $1 to .gitignore"
}
# use
# ignore .DS_STORE
@jottenlips
jottenlips / todo.sh
Last active December 10, 2019 20:52
Get all my todos
grep -rnw './' -e '//TODO:'
@jottenlips
jottenlips / list-repos-gist.sh
Created October 22, 2019 15:23
List all Github repos for a user
curl "https://api.github.com/users/username/repos?per_page=100" | grep -o 'git@[^"]*' | sed "s/.git//g" | sed "s/github.com://g"
@jottenlips
jottenlips / delete-gh-repos.sh
Last active October 28, 2019 14:41
Delete GitHub Repos, Use cautiously
repos=(
"user/repo"
"user/repo1"
"user/repo2"
)
for i in "${repos[@]}"
do
:
curl -XDELETE -H 'Authorization: token yourtokenhere' "https://api.github.com/repos/$i ";
@jottenlips
jottenlips / README.md
Last active September 16, 2019 18:54
♺ Opens Circle CI from your git repo.
$ touch circleci.sh
$ vim circleci.sh

i

@jottenlips
jottenlips / gitsteal.sh
Last active August 16, 2019 19:36
This is a joke.
git clone $@ && cd `echo $@ | sed "s/.git//g" | sed "s/.*\///g"` && rm -rf .git && git init
PACKAGE_VERSION=$(cat package.json | grep '"version":' | awk -F: '{ print $2 }' | sed 's/[",]//g' | sed 's/[ ,]//g')
@jottenlips
jottenlips / 🏖 lazy_git_push_upstream_README.md
Last active November 26, 2019 17:03
🏖 lazy git push upstream

Tired of doing copy pasta for your new branch?

add these lines to .bashrc .zshrc or .bash_profile

alias branch='git symbolic-ref --short HEAD'

alias upstream='git push --set-upstream origin $(echo $(branch))'
@jottenlips
jottenlips / brew dependencies
Created July 30, 2018 01:41
Homebrew uninstall/reinstall dependencies
brew list > brew-list.txt
brew uninstall $(cat brew-list.txt)
brew install $(cat brew-list.txt)