Skip to content

Instantly share code, notes, and snippets.

View joehillen's full-sized avatar
🦡

Joe Hillenbrand joehillen

🦡
View GitHub Profile
@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
@joehillen
joehillen / build.sh
Last active May 30, 2024 07:12
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 / 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 / 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 / keybase.md
Created November 17, 2016 21:50
keybase.md

Keybase proof

I hereby claim:

  • I am joehillen on github.
  • I am joehillen (https://keybase.io/joehillen) on keybase.
  • I have a public key ASA3ziBYql27vBkU1YGhmcwgXcbNLbKihGplnwwZvLxu4Qo

To claim this, I am signing this object:

#!/bin/bash
function run {
# how we want to extract the variables from the commit message.
format_name="--format=%cn"
format_when="--format=%cr"
format_summary="--format=%s"
format_body="--format=%b"
@joehillen
joehillen / rotate-screen.sh
Last active August 29, 2015 14:27 — forked from rubo77/rotate-screen.sh
This script rotates the screen and touchscreen input, disables or enbles the touchpad, and dis- or enables the virtual keyboard on a Lenovo Yoga 13 or Yoga 2 Pro (source: http://askubuntu.com/q/405628/34298)
#!/bin/bash
# This script rotates the screen and touchscreen input 90 degrees each time it is called,
# also disables the touchpad, and enables the virtual keyboard accordingly
# by Ruben Barkow: https://gist.github.com/rubo77/daa262e0229f6e398766
#### configuration
# find your Touchscreen and Touchpad device with `xinput`
TouchscreenDevice='ELAN Touchscreen'
TouchpadDevice='SynPS/2 Synaptics TouchPad'
#!/usr/bin/env runhaskell
{-# LANGUAGE OverloadedStrings #-}
import Prelude hiding (interact)
import Data.Aeson
import Data.Text (Text)
import Data.Text.Encoding (decodeUtf8)
import qualified Data.Text as T
import qualified Data.Text.IO as TIO
@joehillen
joehillen / quoth-the-raven.md
Last active November 20, 2015 05:37
Quoth the Raven, "Turn down for what?"

The Raven

Once upon a midnight dreary, while I pondered, weak and weary,
Over many a quaint and curious volume of forgotten lore—
    While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door.
“’Tis some visitor,” I muttered, “tapping at my chamber door—
            Only this and nothing more.”
@joehillen
joehillen / bandwidth.sh
Last active August 29, 2015 14:07
bandwidth monitor script for i3blocks
#!/bin/bash
if [ "$1" != "" ]; then
echo "Missing required argument: 'tx' or 'rx'" 1>&2
exit 1
fi
if [ "$1" != "rx" -a "$1" != "tx" ]; then
echo "Invalid argument: $1" 1>&2
echo "Usage: $0 (rx|tx)" 1>&2
exit 1