Skip to content

Instantly share code, notes, and snippets.

View joehillen's full-sized avatar
🦡

Joe Hillenbrand joehillen

🦡
View GitHub Profile
@joehillen
joehillen / deno.ts
Created May 1, 2020 21:31
Trying out Deno
#!/usr/bin/env -S deno --allow-run
type AbsDir = string;
type AbsFile = string;
type AbsPath = AbsFile | AbsDir;
type RelFile = string;
type RelDir = string;
type Path = RelFile | AbsFile | RelDir | AbsDir;
async function ls(dir: AbsDir): Promise<RelFile[]> {
@joehillen
joehillen / semver.sh
Created June 9, 2021 20:56
Amend git commits with semversioner changes
#!/bin/bash -ex
BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ $BRANCH == patch* || $BRANCH == bugfix* ]]; then
VER_TYPE=patch
elif [[ $BRANCH == feature* || $BRANCH == minor* ]]; then
VER_TYPE=minor
elif [[ $BRANCH == major* ]]; then
VER_TYPE=major
else
@joehillen
joehillen / build.sh
Last active January 24, 2025 22:05
Build bash scripts with `source` files into a single script.
#!/usr/bin/env bash
#
# https://gist.github.com/joehillen/30f08738c1c3c0ca3e4c754ad33ad2ff
#
# This script inlines 'source' files.
#
# For long scripts, it is nice to be able to break them into multiple files
# to make them easier to work with but still release as a single script.
#
# Inspired by https://stackoverflow.com/a/37533160/334632 with the following enhancements:
@joehillen
joehillen / gist:b8494ad2e06e65b8b57a7d2a0864e3d1
Created July 19, 2023 16:48
Rust 1.71.0 ICE when building deno
[deno 1.35.1] cargo:rerun-if-changed=/home/joe/src/deno/runtime/js/99_main.js
Running `CARGO=/home/joe/.rustup/toolchains/1.71.0-x86_64-unknown-linux-gnu/bin/cargo CARGO_BIN_NAME=deno CARGO_CRATE_NAME=deno CARGO_MANIFEST_DIR=/home/joe/src/deno/cli CARGO_PKG_AUTHORS='the Deno authors' CARGO_PKG_DESCRIPTION='Provides the deno executable' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=MIT CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=deno CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/denoland/deno' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=1.35.1 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=35 CARGO_PKG_VERSION_PATCH=1 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 GIT_COMMIT_HASH=5919f31891f464fb8975084795550d7e731c12de GIT_COMMIT_HASH_SHORT=5919f31 LD_LIBRARY_PATH='/home/joe/src/deno/target/debug/deps:/home/joe/.rustup/toolchains/1.71.0-x86_64-unknown-linux-gnu/lib:/home/joe/.rustup/toolchains/1.71.0-x86_64-unknown-linux-gnu/lib' OUT_DIR=/home/joe/src/deno/target/debug/build/deno-d5280f