Skip to content

Instantly share code, notes, and snippets.

@dcts
dcts / workbench.colorCustomizations.json
Created April 14, 2020 16:51 — forked from jacklorusso/workbench.colorCustomizations.json
A list of all Visual Studio Code customizable colors, grouped by UI region. Copy and paste into User Settings (comments are allowed) to tweak an existing theme or work on your own.
"workbench.colorCustomizations": {
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast.
"contrastActiveBorder": "",
"contrastBorder": "",
// Base Colors
"focusBorder": "",
"foreground": "",
"widget.shadow": "",
"selection.background": "",
"descriptionForeground": "",
@andyvanee
andyvanee / README.md
Last active July 3, 2024 23:12
GoDaddy + LetsEncrypt Certificate Installation

GoDaddy + LetsEncrypt Certificate Installation

Valid as of September 2020

note: if you have shell access and want to automatically renew, follow the steps on this page instead

Much of the current documentation on this from LetsEncryt and Godaddy suggests that this is a very hard thing to do - but I'm okay with spending 10 minutes every 2-3 months for a free, quality SSL certificate. If you are too, here's how I do it.

# TODO: variants of non-alphanumerics, greek letters, and others
!"#$%&'()*+,-./⓿❶❷❸❹❺❻❼❽❾:;<=>?@🅐🅑🅒🅓🅔🅕🅖🅗🅘🅙🅚🅛🅜🅝🅞🅟🅠🅡🅢🅣🅤🅥🅦🅧🅨🅩[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ # BlackCircle
!"#$%&'()*+,-./0123456789:;<=>?@🅰🅱🅲🅳🅴🅵🅶🅷🅸🅹🅺🅻🅼🅽🅾🅿🆀🆁🆂🆃🆄🆅🆆🆇🆈🆉[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ # BlackSquare
!"#$%&'()*+,-./𝟎𝟏𝟐𝟑𝟒𝟓𝟔𝟕𝟖𝟗:;<=>?@𝐀𝐁𝐂𝐃𝐄𝐅𝐆𝐇𝐈𝐉𝐊𝐋𝐌𝐍𝐎𝐏𝐐𝐑𝐒𝐓𝐔𝐕𝐖𝐗𝐘𝐙[\]^_`𝐚𝐛𝐜𝐝𝐞𝐟𝐠𝐡𝐢𝐣𝐤𝐥𝐦𝐧𝐨𝐩𝐪𝐫𝐬𝐭𝐮𝐯𝐰𝐱𝐲𝐳{|}~ # Bold
!"#$%&'()*+,-./0123456789:;<=>?@𝕬𝕭𝕮𝕯𝕰𝕱𝕲𝕳𝕴𝕵𝕶𝕷𝕸𝕹𝕺𝕻𝕼𝕽𝕾𝕿𝖀𝖁𝖂𝖃𝖄𝖅[\]^_`𝖆𝖇𝖈𝖉𝖊𝖋𝖌𝖍𝖎𝖏𝖐𝖑𝖒𝖓𝖔𝖕𝖖𝖗𝖘𝖙𝖚𝖛𝖜𝖝𝖞𝖟{|}~ # BoldFraktur
@blmalone
blmalone / partial-verify.ts
Created July 3, 2024 22:53
Given a forge artifact JSON file and a contract address, this script verifies that the contract addresses init and runtime code from Etherscan match the expected init and runtime code in the JSON file.
/**
* Given a forge artifact JSON file and a contract address, this script verifies that the contract addresses init and runtime code from Etherscan
* match the expected init and runtime code in the JSON file.
*/
import { Hex, PublicClient, createPublicClient, http } from "viem";
import fs from "fs";
import { mainnet } from "viem/chains";
import path from "path";
interface InputJson {
@nvictus
nvictus / loadnpy.js
Last active July 3, 2024 23:08
NumPy binary file parser for javascript
// Client-side parser for .npy files
// See the specification: http://docs.scipy.org/doc/numpy-dev/neps/npy-format.html
var NumpyLoader = (function () {
function asciiDecode(buf) {
return String.fromCharCode.apply(null, new Uint8Array(buf));
}
function readUint16LE(buffer) {
var view = new DataView(buffer);
var val = view.getUint8(0);
@basham
basham / css-units-best-practices.md
Last active July 3, 2024 23:07
CSS Units Best Practices

CSS units

Recommendations of unit types per media type:

Media Recommended Occasional use Infrequent use Not recommended
Screen em, rem, % px ch, ex, vw, vh, vmin, vmax cm, mm, in, pt, pc
Print em, rem, % cm, mm, in, pt, pc ch, ex px, vw, vh, vmin, vmax

Relative units

Relative units

@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active July 3, 2024 23:07 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@ritchiecarroll
ritchiecarroll / README.md
Last active July 3, 2024 23:04
Manual Windows Partitions Recovery and Restore from Windows Image Backup

Manual Windows Partitions Recovery and Restore from Windows Image Backup

Steps below iterate how to manually recreate the disk partitions required by Windows and restore a Windows installation from a system image backup created with the "Backup and Restore (Windows 7)" feature, especially when the official steps fail.

These steps were tested with Windows 11, but should work with prior versions of Windows as well:

@bradtraversy
bradtraversy / terminal-commands.md
Last active July 3, 2024 23:04
Common Terminal Commands

Common Terminal Commands

Key Commands & Navigation

Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:

  • Up Arrow: Will show your last command
  • Down Arrow: Will show your next command
  • Tab: Will auto-complete your command
  • Ctrl + L: Will clear the screen
@tel
tel / gist:7ad4dafb6c39221fc773
Last active July 3, 2024 23:03
Lennart Augustsson's "Simpler, Easier!", copied (without permission) to get around the Great Fire Wall

Simpler, Easier!

Lennart Augustsson, Oct 25, 2007

In a recent paper, Simply Easy! (An Implementation of a Dependently Typed Lambda Calculus), the authors argue that type checking a dependently typed language is easy. I agree whole-heartedly, it doesn't have to be difficult at all. But I don't think the paper presents the easiest way to do it. So here is my take on how to write a simple dependent type checker. (There's nothing new here, and the authors of the paper are undoubtedly familiar with all of it.)

I'll start by implementing the untyped lambda calculus. It's a very simple language with just three constructs: variables, applications, and lambda expressions, i.e.,