Skip to content

Instantly share code, notes, and snippets.

View berndverst's full-sized avatar

Bernd Verst berndverst

View GitHub Profile
@berndverst
berndverst / organize-functions.sh
Last active June 25, 2020 22:51
Shell (Bash, ZSH) functions for easily organizing media files and documents on MacOS and Linux
# Example use:
# cd ~/Downloads
# mvmedia .
# mvdocs .
#
# Intended to be used for MacOS, but can be used on Linux if destination folders are altered.
# Simply save this file and source in your .zshrc, .bash_profile, .bashrc etc
mvimages() {
DESTINATION="$HOME/Pictures/"
@berndverst
berndverst / # openjdk - 2020-10-05_23-44-13.txt
Created October 6, 2020 06:47
openjdk on Ubuntu 20.04.1 LTS - Homebrew build logs
Homebrew build logs for openjdk on Ubuntu 20.04.1 LTS
Build date: 2020-10-05 23:44:13
@berndverst
berndverst / Live Coding Music Workshop.md
Last active January 11, 2021 02:41
Workshop: Creating Music through Live Coding

Creating Music through Live Coding

Author: Bernd Verst

In this workshop we will use the Sonic Pi live coding synthesizer to create part of an iconic song, live. We'll be creating the repeating four bar / measure phrase of the opening song to Hamilton, Alexander Hamilton.

Participation is strongly encouraged. A note on accessibility: Unfortunately this workshop relies on the participant / learner to receive immediate feedback via audio. Hearing impaired participation is possible and correctness of a piece of music can be achieved, but will be less enjoyable.

Prerequisites

You need to install Sonic Pi from here: https://sonic-pi.net/

@berndverst
berndverst / copilot example.md
Created June 29, 2021 16:46
Simple Copilot Example

Existing code:

import requests


def get_hacker_news_stories_by_search_term(search_term: str):
    """
    Get the stories from Hacker News mentioning the search term.
 """
@berndverst
berndverst / Readme.md
Created August 26, 2022 21:01
GitHub CLI helper for OSS maintainers to update/fixup PRs from contributors

GitHub (GH) CLI helper script to update Pull Requests (PRs) from contributors.

As a maintainer of an OSS project I constantly find myself having to fix up incoming PRs. I enjoy using the GitHub CLI, but unfortunately this CLI does not provide an easy way to identify the remote fork the PR originated from.

As a result my git remote -v lists a lot of remotes that I had to manually add after viewing the PR in my browser to obtain the remote clone URL. This is not sustainable. Git allows pushing to a remote URL directly, so there is no need to define the remote before hand.

This script defines a utility functions that makes it easy for gh GitHub CLI users to update contributions.

@berndverst
berndverst / README.md
Created October 6, 2022 20:29
Update PR remote branch checked out via Github CLI (gh pr checkout)

Compendium function for updating PRs checked out via GitHub CLI

This script is called updatePR.

Usage:

gh pr checkout 1234
# make some changes
updatePR 1234