Skip to content

Instantly share code, notes, and snippets.

View rivy's full-sized avatar
🏠
Working from home

Roy Ivy III rivy

🏠
Working from home
View GitHub Profile
@rivy
rivy / kagi-darkmustard-theme.css
Created April 5, 2024 21:30 — forked from joshellington/kagi-darkmustard-theme.css
A slightly refined, dark-focused, mobile-supported Kagi theme. Works best using Dark Theme, and either Moon Dark or Royal Blue.
:root {
--font-main: "Inter", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
--font-lufga: "Inter", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
.theme_dark, .theme_moon_dark {
--background-color: #181715;
--page-text-color: #F2E6D7;
--color-primary: #F2E6D7;
@rivy
rivy / kagi.css
Created April 5, 2024 21:26 — forked from sefidel/kagi-oranginum.md
Kagi Custom CSS
/* Personal Tweaks */
.doggo-sit {
display: none;
}
/* Theme - Dark */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
.theme_dark {
--k-accent: #f16d43;
--k-accent-alt: #62a09d;
@rivy
rivy / ExportKindle.js
Created January 4, 2024 19:28 — forked from jkubecki/ExportKindle.js
Amazon Kindle Export
// The following data should be run in the console while viewing the page https://read.amazon.com/
// It will export a CSV file called "download" which can (and should) be renamed with a .csv extension
var db = openDatabase('K4W', '3', 'thedatabase', 1024 * 1024);
getAmazonCsv = function() {
// Set header for CSV export line - change this if you change the fields used
var csvData = "ASIN,Title,Authors,PurchaseDate\n";
db.transaction(function(tx) {

ES Modules are terrible, actually

This post was adapted from an earlier Twitter thread.

It's incredible how many collective developer hours have been wasted on pushing through the turd that is ES Modules (often mistakenly called "ES6 Modules"). Causing a big ecosystem divide and massive tooling support issues, for... well, no reason, really. There are no actual advantages to it. At all.

It looks shiny and new and some libraries use it in their documentation without any explanation, so people assume that it's the new thing that must be used. And then I end up having to explain to them why, unlike CommonJS, it doesn't actually work everywhere yet, and may never do so. For example, you can't import ESM modules from a CommonJS file! (Update: I've released a module that works around this issue.)

And then there's Rollup, which apparently requires ESM to be u

@rivy
rivy / ANSI.md
Created March 3, 2024 03:39 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@rivy
rivy / .gitignore
Created August 1, 2023 02:06 — forked from hieblmedia/.gitignore
Gitignore - Exclude all except specific subdirectory
#
# If all files excluded and you will include only specific sub-directories
# the parent path must matched before.
#
/**
!/.gitignore
###############################
# Un-ignore the affected subdirectory
@rivy
rivy / a.cs
Created June 11, 2016 23:45 — forked from msugakov/a.cs
C# program that starts process and combines its standart output and standard error in one stream
using System;
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
class App
{
public static int ExecuteProcess(
string fileName,
string arguments,
@rivy
rivy / aoc.css
Created May 20, 2023 21:23 — forked from saidaspen/aoc.css
AoC CSS
input ~ span:before,
.leaderboard-entry,
.privboard-row {
font-family: "Source Code Pro", monospace;
letter-spacing: 1px;
}
body * {
text-shadow: none !important;
}
@rivy
rivy / renew-gpgkey.md
Created February 26, 2023 07:03 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@rivy
rivy / updateNpm.bat
Last active November 5, 2022 18:26 — forked from johnmcase/updateNpm.bat
Update npm on windows
@setLocal EnableDelayedExpansion
@echo off
:: from <https://gist.github.com/rivy/c69563af410d8e8e6e105e5554578fc8>; cloned from https://github.com/coreybutler/nvm-windows/issues/300
set wanted_version=%~1
if NOT DEFINED wanted_version ( set "wanted_version=latest" )
if "!wanted_version!" == "latest" (
for /f %%i in ('npm show npm version') do set wanted_version=%%i