This file contains hidden or 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
defmodule Mix.Tasks.CheckTypes do | |
@moduledoc "The checktypes mix task: `mix help checktypes`" | |
use Mix.Task | |
@shortdoc "Runs Dialyzer and compares the results to our existing errors." | |
def run(_args) do | |
# https://github.com/jeremyjh/dialyxir/blob/ed0df656a74eb6d4e906fe20fc056ca42ba7d5ec/lib/mix/tasks/dialyzer.ex#L145-L155 | |
output = Mix.Task.run("dialyzer", ["--quiet", "--format", "ignore_file"]) | |
This file contains hidden or 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
kubeforward() { | |
# https://yuku.takahashi.coffee/blog/2020/07/connect-to-a-resource-behind-a-k9s-cluster-from-local-machine | |
# https://hub.docker.com/r/alpine/socat | |
if [[ ($# -ne 3 && $# -ne 4) ]]; then | |
echo "Usage: kubeforward <endpoint> <endpoint_port> <local_port> [<label>]" | |
return | |
fi | |
KUBE_NAMESPACE="default" |
This file contains hidden or 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
rsql() { | |
# https://docs.aws.amazon.com/redshift/latest/mgmt/rsql-query-tool-getting-started.html | |
# https://stackoverflow.com/questions/38670295/homebrew-refusing-to-link-openssl | |
# https://www.deepanseeralan.com/tech/openssl-dev-on-macOS/ | |
BREW_PREFIX=$(brew --BREW_PREFIX [email protected]) | |
RSQL_OPENSSL_PATH="/usr/local/opt/[email protected]/lib" | |
LIB="/usr/local/lib" | |
export PATH="$BREW_PREFIX/bin:$PATH" | |
export LDFLAGS="-L$BREW_PREFIX/lib" |
This file contains hidden or 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
kubeshell() { | |
# Set these: | |
KUBE_NAMESPACE= | |
KUBE_POD= | |
kubectl -n "$KUBE_NAMESPACE" exec -ti "$KUBE_POD" -- bash | |
} | |
kubepg() { | |
# Options: | |
# 1: dev, test, or prod |
This file contains hidden or 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
# Pulled from https://fossil-scm.org/home/file?name=Dockerfile&ci=trunk | |
# With more build ARGs, cleaner tarball extraction, HTTPS, etc. | |
ARG ALPINE_VERSION | |
ARG FSLHSH | |
ARG FSLVER | |
ARG FSLCFG="" | |
# syntax=docker/dockerfile:1.3 | |
# See www/containers.md for documentation on how to use this file. |
This file contains hidden or 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 | |
# Grep on macOS is limited and weird, so we're using Perl for the regex (and awk because it's easy) | |
UNFORMATTED_FILES=$(mix format --check-formatted 2>&1 | perl -nle'print $& while m{^|[^*]\* \K.*}g' | awk NF | sort) | |
STAGED_FILES=$(git diff --name-only --cached | sort) | |
# Files that need formatting and are currently staged (comm expects sorted inputs) | |
INTERSECTION=$(comm -12 <(echo "$UNFORMATTED_FILES") <(echo "$STAGED_FILES")) | |
GREEN='\033[0;32m' |
This file contains hidden or 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
{ | |
"title": "Add ctrl/fn/cmd + left click -> right click", | |
"rules": [ | |
{ | |
"description": "ctrl+left click to right click", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"pointing_button": "button1", |
This file contains hidden or 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 | |
wget --no-clobber --no-parent --recursive --random-wait --user-agent=mozilla --reject "*.html*" $1 |
This file contains hidden or 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 | |
# VIDEOS=$(fd mp4) | |
# for VIDEO in $VIDEOS | |
# do | |
# done | |
/usr/bin/find . -type f -name "*.mp4" -print0 | while IFS= read -r -d '' VIDEO; do | |
echo "Compressing $VIDEO..." |
This file contains hidden or 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
// ==UserScript== | |
// @name Remove resolved bot threads on a merge request | |
// @description Remove resolved bot threads on a merge request | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @author Noah Betzen | |
// @match https://gitlab.com/*/merge_requests/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=gitlab.com | |
// @grant none | |
// ==/UserScript== |