Skip to content

Instantly share code, notes, and snippets.

@prestontimmons
prestontimmons / gist:1483097
Created December 15, 2011 21:58
Makefile for generating ssl certs
UTF8 := $(shell locale -c LC_CTYPE -k | grep -q charmap.*UTF-8 && echo -utf8)
SERIAL=0
.PHONY: usage
.SUFFIXES: .key .csr .crt .pem
.PRECIOUS: %.key %.csr %.crt %.pem
usage:
@echo "This makefile allows you to create:"
@echo " o public/private key pairs"
@EdwardBetts
EdwardBetts / pprint_color.py
Last active October 10, 2024 04:42
Python pprint with color syntax highlighting for the console
from pprint import pformat
from typing import Any
from pygments import highlight
from pygments.formatters import Terminal256Formatter
from pygments.lexers import PythonLexer
def pprint_color(obj: Any) -> None:
"""Pretty-print in color."""
@thehig
thehig / aggregateDebounce.js
Last active December 7, 2020 07:37
js: Aggregate Debounce
/*
Client wishes to emit a number of actions
Actions are identical RSAAs, with varying meta properties (usually the ID to request)
Ideal scenario
* Numerous actions are taken in within a timeout/debounce window
* After the timeout has expired, the actions are aggregated into a single API call
dispatch({
type: "SOME_FETCH_REQUEST",