Skip to content

Instantly share code, notes, and snippets.

@ikwyl6
ikwyl6 / git-chg-to-ssh.sh
Created July 6, 2023 00:16
bash script for github to change all https clone/repo urls to ssh urls
#!/bin/bash
# Script git-chg-to-ssh.sh
# Uploaded to gist github
#
# By ikwyl6@protonmail.com
#
# Change all https github clone addresses to ssh
# Use DEBUG=[1|2] before command to see some debug output
# Use PROCEED=1 to actually make the 'set-url' change
@ikwyl6
ikwyl6 / discogs_album_art.py
Created November 20, 2020 00:27
python discogs script that gives a link to an album cover
#!/usr/bin/python
# https://gist.github.com/ikwyl6
# discogs script to get the url of the discogs for a album
import discogs_client
import argparse
"""
discogs_client objects:
https://github.com/discogs/discogs_client/blob/master/discogs_client/models.py#L691
@ikwyl6
ikwyl6 / git-status-alias.sh
Last active January 29, 2022 22:55
'git status' alias function that colors the output if 'branch is ahead' or 'branch is behind' upstream repo
# created by ikwyl6@protonmail.com
# alias function for 'git status' - colors the 'branch is ahead' or 'branch is behind'
# Add to your .bashrc and then do '$ source ~/.bashrc'
function gs() {
# Do I have any stashes I didn't know about?
git stash list | sed -E -e $'s/stash@\{[0-9]+\}/\e[0;31m&\e[0m/'
if [[ -z "$1" ]]; then
branch="$(git rev-parse --abbrev-ref --symbolic-full-name @{u})"
else branch="$1"
fi