Skip to content

Instantly share code, notes, and snippets.

View lexisother's full-sized avatar
💻
exams are literally happening

Alyxia Sother lexisother

💻
exams are literally happening
View GitHub Profile
@lexisother
lexisother / script.js
Created May 22, 2023 12:40
Migrating Dark Reader settings from one place to another
// To use any of the code here, inspect the background view from your browser's extension page
// Chrome:
// 1. chrome://extensions
// 2. "Inspect views background/index.html"
// Firefox:
// 1. about:debugging#/runtime/this-firefox
// 2. Inspect button
// To look at any options you may want to carry over, log all settings
chrome.storage.sync.get(null, console.log);
@lexisother
lexisother / message.asc
Last active May 10, 2023 09:38
**THIS IS OBSOLETE!!! THE ACCOUNT WAS RESTORED!!!** | My Discord account was once again disabled, here is PGP signed proof, here is my Keybase: https://keybase.io/lexisother
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hello! My Discord account Alyxia#4650 was disabled!
My temporary new username is Alyxia was disabled#0309 and I will use this to reach out to people about the events. Sorry if I scare you!
-----BEGIN PGP SIGNATURE-----
Version: Keybase OpenPGP v2.1.13
Comment: https://keybase.io/crypto
wsFcBAABCgAGBQJkWoaCAAoJEAHhbE53WjfkqucQAIhEOZmq+sJJYiym1zmbTCRx
#!/usr/bin/env zsh
setopt ERR_EXIT ERR_RETURN NO_UNSET PIPE_FAIL
ansi_reset="$(tput sgr0 || true)"
ansi_red="$(tput setaf 1 || true)"
ansi_yellow="$(tput setaf 3 || true)"
ansi_blue="$(tput setaf 4 || true)"
log_info() { echo >&2 "${ansi_blue}[info]${ansi_reset}" "$@"; }
log_warn() { echo >&2 "${ansi_yellow}[warn]${ansi_reset}" "$@"; }
(defun maxcount (nums)
(max (count-if (lambda (a) (< a 0)) nums)
(count-if (lambda (a) (> a 0)) nums)))
(print (maxcount '(1 2 3 4 5 6 -3 -5 7 -7)))
require "id3tag"
unless ARGV[0]
raise "No mp3 directory given!"
end
dir = ARGV[0]
unless dir.end_with? "/" then dir += "/" end
mp3s = Dir.glob(dir + "*.mp3")
@lexisother
lexisother / keep-rebase-date.md
Last active August 1, 2023 18:15
Reset commit metadata after rebasing

WARNING: ONLY DO THIS IN PERSONAL REPOSITORIES!!!

What I know now is that you can just use the --committer-date-is-author-date with a range of all dirty commits after a rebase session that reset a lot of dates.

The above seems to not always work. When in doubt:

git -c rebase.instructionFormat='%s%nexec GIT_COMMITTER_DATE="%cD" git commit --amend --no-edit --allow-empty --allow-empty-message' rebase -i HEAD~N

Instructions

Quick and dirty setup

# clone main repo and begin installing pkgs in the background
git clone https://github.com/dmitmel/crosscode-translateinator
cd crosscode-translateinator
pnpm i &
# clone the second repo and start building

Keybase proof

I hereby claim:

  • I am lexisother on github.
  • I am lexisother (https://keybase.io/lexisother) on keybase.
  • I have a public key ASBTrX7sHzICN_0oqBewCAFeLcAJ-MBMC4Rux3sotcm31Qo

To claim this, I am signing this object:

@lexisother
lexisother / regedit.zsh
Last active January 12, 2022 21:47
Custom emote registry script
#!/usr/bin/env zsh
SCRIPT_PATH="${0:a:h}"
CONFIG_PATH="$HOME/.config/emote-regedit"
# Utility functions {{{
# Logging {{{
ansi_reset="$(tput sgr0 || true)"
ansi_red="$(tput setaf 1 || true)"
ansi_yellow="$(tput setaf 3 || true)"
@lexisother
lexisother / imperial
Last active January 11, 2022 15:13
A simple tool to upload files to imperialb.in
#!/usr/bin/env bash
# TODO: Implement autodetection of the code language using Linguist
# The one reason I am slightly opposed to implementing this is because, well,
# it requires me to rely on an external tool. Usually I would not have many
# problems with this, but it's a shell script, I prefer to have it as
# self-contained as can be. See, if I were to use external tools to power the
# script such as Linguist, I might as well just write the thing in Ruby and
# call it a day.