Skip to content

Instantly share code, notes, and snippets.

@jamesacklin
jamesacklin / SketchSystems.spec
Last active September 26, 2018 19:03
Application
Application
Logged Out
log in -> Logged In
Logged In
log out -> Logged Out
Presentation&
Title
Untitled*
Post
author posts new standard -> New & Default
author posts new special -> New & Enhanced
Standard
New & Default
user revisits home page -> Default
Default*
Special
New & Enhanced
user revisits home page -> Enhanced
@jamesacklin
jamesacklin / make-wallpaper.sh
Last active January 19, 2022 15:56
Make a desktop-sized image from any picture
#!/bin/bash
source=$1
dest=${source::-4}_wp.jpg
colors=($(convert $source +dither -colors 2 -define histogram:unique-colors=true -format "%c" histogram:info: | awk '//{print $3}'))
convert $source \
-gravity center \
-resize 1280x1280 \
-bordercolor ${colors[1]} \
import colorsys
import re
def hex_to_rgb(hex_color):
"""Convert hex color to RGB values (0-1 range)"""
hex_color = hex_color.lstrip('#')
rgb = tuple(int(hex_color[i:i+2], 16) for i in (0, 2, 4))
return tuple(x/255 for x in rgb)
def rgb_to_hsl(rgb):
#!/usr/bin/env python3
"""
Export COMPLETE message history from Tlon channels with pagination.
This script works on both hosted and local ships.
"""
import argparse
import requests
from datetime import datetime