This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Function to measure execution time | |
measure_time() { | |
start_time=$(date +%s.%N) | |
"$@" | |
end_time=$(date +%s.%N) | |
execution_time=$(echo "$end_time - $start_time" | bc) | |
echo "Execution time: $execution_time seconds" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"title": "Rules for Karabiner-Elements", | |
"rules": [ | |
{ "description": "Press left_command twice to send Cmd+L (Focus Address Bar in Chrome)", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_command", | |
"modifiers": { | |
"optional": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# colorization without needing a gem | |
class String | |
def colorize(color_code) | |
"\e[#{color_code}m#{self}\e[0m" | |
end | |
def red | |
colorize(31) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name CK - add page links to navbar | |
// @namespace Violentmonkey Scripts | |
// @match https://app.convertkit.com/* | |
// @grant none | |
// @version 1.0 | |
// @author - | |
// @description Adds Rules and Sequences to top-level nav | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CGPath+svg.swift | |
// | |
// Create an SVG element from a CGPath. | |
// | |
// Created by Dave Ceddia. | |
// MIT Licensed | |
// | |
// Inspired by: https://github.com/mro/MROGeometry/blob/master/MROGeometry/CGPathWriter.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL = /bin/bash | |
.PHONY: all clean | |
all: _site/style.css | |
clean: | |
rm -rf _site/style.css | |
_site/style.css: styles/tailwind.css tailwind.config.js | node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Center things": { | |
"prefix": "cf", | |
"body": ["align-items: center;", "justify-content: center;"], | |
"description": "Center items in a flex container" | |
} |
NewerOlder