openpgp4fpr:BA4DA9CABC611D90D3F4822421F78F35EB0750DC
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
# Install/run these first: | |
# sudo xcrun xcodebuild -license accept | |
# xcode-select --install | |
# brew install postgresql@15 libxml2 openssl@1.1 qt | |
git clone git@github.com:pgmodeler/pgmodeler.git | |
cd pgmodeler | |
git clone git@github.com:pgmodeler/plugins.git | |
# TODO: Figure out error with sampleplugin? (Or maybe this is expected because it's a sample...) |
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
// ==UserScript== | |
// @name Remove Shorts and Lives from YouTube Subscriptions | |
// @description Remove Shorts and Lives from YouTube Subscriptions | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @author Noah Betzen | |
// @match https://www.youtube.com/feed/subscriptions | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com | |
// @grant none | |
// ==/UserScript== |
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
# Usage: codeSettings <key> [<value>] | |
codeSettings() { | |
SETTINGS_DIR="$HOME/Library/Application Support/Code/User" | |
FILE="$SETTINGS_DIR/settings.json" | |
KEY=$1 | |
VALUE=$2 | |
if ! command -v jq &> /dev/null; then | |
echo -e "ERROR\n\tjq must be installed to process JSON" |
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
# "please implement the frexp function in elixir, and minify it as much as possible" | |
defmodule Decode do | |
use Bitwise | |
@b 1022 | |
def frexp(v), do: <<s::1, e::11, f::52>> = <<v::float>>; frexp(s, f, e) | |
defp frexp(_, 0, 0), do: {0.0, 0} | |
defp frexp(s, f, 0), do: exp = bl(f); <<r::float>> = <<s::1, @b::11, (f-1)::52>>; {r, -(@b) - 52 + exp} | |
defp frexp(s, f, e), do: <<r::float>> = <<s::1, @b::11, f::52>>; {r, e - @b} | |
def bl(v), do: bl(v, 0) | |
defp bl(0, n), do: n |
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
{"created_by":"Tampermonkey","version":"1","scripts":[{"name":"Remove resolved bot threads on a merge request","options":{"check_for_updates":false,"comment":null,"compat_foreach":false,"compat_metadata":false,"compat_powerful_this":null,"compat_wrappedjsobject":false,"compatopts_for_requires":true,"noframes":null,"override":{"merge_connects":true,"merge_excludes":true,"merge_includes":true,"merge_matches":true,"orig_connects":[],"orig_excludes":[],"orig_includes":[],"orig_matches":["https://gitlab.com/incharging*merge_requests/*"],"orig_noframes":null,"orig_run_at":"document-idle","use_blockers":[],"use_connects":[],"use_excludes":[],"use_includes":[],"use_matches":[]},"run_at":null,"sandbox":null,"tab_types":null,"unwrap":null},"storage":{"ts":1677781763827,"data":{}},"enabled":true,"position":1,"uuid":"9d53d50d-1cce-493d-bd37-aac54a40d408","source":"Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICBSZW1vdmUgcmVzb2x2ZWQgYm90IHRocmVhZHMgb24gYSBtZXJnZSByZXF1ZXN0Ci8vIEBkZXNjcmlwdGlvbiAgUmVtb3ZlIHJlc29sdmVkIGJvdCB |
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
// ==UserScript== | |
// @name Remove HackerNews threads by regex | |
// @description Remove HackerNews threads by regex | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @author Noah Betzen | |
// @match https://news.ycombinator.com/ | |
// @match https://news.ycombinator.com/news | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=ycombinator.com | |
// @grant none |
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
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 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 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 openssl@1.1) | |
RSQL_OPENSSL_PATH="/usr/local/opt/openssl@1.1/lib" | |
LIB="/usr/local/lib" | |
export PATH="$BREW_PREFIX/bin:$PATH" | |
export LDFLAGS="-L$BREW_PREFIX/lib" |