This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{- stack script | |
--resolver lts-21.11 | |
--package singleton-bool | |
--package text | |
-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeOperators #-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This script is a wrapper for creating and managing Python virtual environments. | |
# Usage: | |
# py-venv-wrapper.sh <command> | |
# Run the script in the directory containing the requirements.txt file. | |
# The script will create a virtual environment in the ".venv" directory | |
# and execute the command within the virtual environment. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# Removes local branches that are no longer tracked on remote | |
set -e | |
branches=($(git branch -vv | grep ": gone" | grep -v "^+" | sed -r 's/^ *([^ ]+).*$/\1/')) | |
if (( ${#branches[@]} == 0 )); then | |
echo "Nothing to prune" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
declare -a pids=() | |
if (( $EUID != 0 )); then | |
sudo "$0" "$@" | |
exit 0 | |
fi |