Skip to content

Instantly share code, notes, and snippets.

View Nezteb's full-sized avatar
💣
hello world'); DROP TABLE Statuses;--

Noah Betzen Nezteb

💣
hello world'); DROP TABLE Statuses;--
View GitHub Profile
@Nezteb
Nezteb / libraries_and_frameworks.md
Created June 14, 2023 14:36 — forked from zachdaniel/libraries_and_frameworks.md
EEF Working Group Proposal: Libraries and Frameworks Working Group

Libraries and Frameworks Working Group

Mission Statement

  • To provide resources for library and framework authors to ensure that BEAM languages have a rich, vibrant ecosystem with a high degree of developer experience. Main Objectives
  • Provide and maintain best practices on library and framework standardization, documentation, code, and distribution. Collaborate to work on and make proposals for underlying tooling that improve the experience for library/framework authors and users.
  • Provide more visibility into the library ecosystem of Elixir on behalf of both authors and users.
  • (if Build and Packaging want to move this here, we could also take this over) Improve the user experience in generating and accessing documentation from the shell, IDEs, web pages, and more.
@Nezteb
Nezteb / Dockerfile
Created June 7, 2023 01:01
Deploying Conduit (Matrix homeserver built in Rust) on Fly.io
# https://gitlab.com/famedly/conduit/-/blob/next/docker/README.md
# https://gitlab.com/famedly/conduit/-/blob/next/Dockerfile
# https://hub.docker.com/r/matrixconduit/matrix-conduit
FROM matrixconduit/matrix-conduit:next-bullseye
ENV CONDUIT_SERVER_NAME="my.domain.com"
ENV CONDUIT_DATABASE_BACKEND="rocksdb"
# Set to false after making your first admin user
@Nezteb
Nezteb / atuin.zsh
Created May 5, 2023 00:57
A shell hack for restoring basic up/down arrow functionality with atuin while still using its database instead of vanilla shell history until it's implemented natively: https://github.com/ellie/atuin/issues/798
export ATUIN_ARROW_INDEX=-1
upArrow() {
export ATUIN_ARROW_INDEX=$(( ATUIN_ARROW_INDEX + 1))
COMMAND=$(atuin search --limit 1 --offset $ATUIN_ARROW_INDEX | cut -f2)
LBUFFER="$COMMAND"
return
}
# Install/run these first:
# sudo xcrun xcodebuild -license accept
# xcode-select --install
# brew install postgresql@15 libxml2 [email protected] qt
git clone [email protected]:pgmodeler/pgmodeler.git
cd pgmodeler
git clone [email protected]:pgmodeler/plugins.git
# TODO: Figure out error with sampleplugin? (Or maybe this is expected because it's a sample...)
@Nezteb
Nezteb / removeShortsAndLivesFromYouTubeSubscriptions.js
Created April 11, 2023 01:05
[WIP] Remove Shorts and Lives from YouTube Subscriptions
// ==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==
@Nezteb
Nezteb / code_settings.sh
Last active October 27, 2023 04:31
Get and maybe update a VS Code setting
# 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"

openpgp4fpr:BA4DA9CABC611D90D3F4822421F78F35EB0750DC

@Nezteb
Nezteb / frexp_min.ex
Created April 5, 2023 17:26
By ChatGPT using GPT-4
# "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
{"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
@Nezteb
Nezteb / removeHackerNewsThreadsByRegex.js
Last active April 1, 2023 21:00
Remove HackerNews threads by regex (for use with https://www.tampermonkey.net/)
// ==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