Skip to content

Instantly share code, notes, and snippets.

View Maximization's full-sized avatar

Maxim Orlov Maximization

View GitHub Profile
@dceddia
dceddia / ck-hide-unsubs.js
Last active February 14, 2022 19:27
Hide unsubscribers in ConvertKit (or replace them with a "% Stayed" instead)
// ==UserScript==
// @name CK - Hide or replace unsubs
// @namespace Violentmonkey Scripts
// @match https://app.convertkit.com/*
// @grant none
// @version 1.0
// @author -
// @description Hides the Unsubscribers number on broadcasts, or replaces it with the percentage of people who stayed.
// ==/UserScript==
@dceddia
dceddia / markdown-to-email.sh
Created September 7, 2021 18:05
Drop this in your .zshrc/.bashrc, copy some Markdown to the clipboard, and run `mkemail`. Paste the HTML wherever you want. Requires `pandoc` installed (brew install pandoc).
# Take a Markdown email from the clipboard or a file and turn it into HTML
function mkemail() {
# Either read from clipboard (default) or read from a file
if [[ -z $1 ]]; then
content=`pbpaste`
echo "Reading from clipboard"
else
content=`cat $1`
echo "Reading from file '$1'"
fi
@2xAA
2xAA / iterm-colors-to-vscode.js
Last active March 20, 2024 07:36
Convert iTerm2 "itermcolors" file to VSCode terminal color scheme
/* Generate colors using https://github.com/andreyvit/plist-to-json */
const col = [] // run your .itermcolors file through the above parser and replace the array with the output
function componentToHex(c) {
const hex = c.toString(16)
return hex.length === 1 ? `0${hex}` : hex
}
const mapping = {
'terminal.background':'Background Color',