convert gw-original-1400.png -write mpr:img +delete \( mpr:img -resize 1280x +write gw-1280.png \) \( mpr:img -resize 1024x +write gw-1024.png \) \( mpr:img -resize 512x +write gw-512.png \) \( mpr:img -resize 500x +write gw-500.png \) \( mpr:img -resize 300x +write gw-300.png \) \( mpr:img -resize 256x +write gw-256.png \) \( mpr:img -resize 160x +write gw-160.png \) \( mpr:img -resize 128x +write gw-128.png \) \( mpr:img -resize 100x +write gw-100.png \) \( mpr:img -resize 90x +write gw-90.png \) \( mpr:img -resize 80x +write gw-80.png \) \( mpr:img -resize 64x +write gw-64.png \) \( mpr:img -resize 50x +write gw-50.png \) \( mpr:img -resize 40x +write gw-40.png \) \( mpr:img -resize 32x +write gw-32.png \) \( mpr:img -resize 16x +write gw-16.png \) null:
h
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/sh | |
# Grab all possible textures from LL's own CDN, referenced by UUID from LLSD backups. | |
# Usage: Go to where your LLSD XML files are stored; run script. Wait a few seconds. Done! | |
# (cc) 2024 by Gwyneth Llewelyn. Some rights reserved. | |
# Distributed under the MIT license: https://gwyneth-llewelyn.mit-license.org | |
# Second Life® is a registered trademark of Linden Lab. No copyright infringement is intended. | |
# | |
LLURL=http://asset-cdn.glb.agni.lindenlab.com/?texture_id= | |
for uuid in $( ug -U -P --format='%1%~' --regexp '<uuid>([a-f0-9\-]+)</uuid>' -- *.xml | sort | uniq ) ; | |
do |
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
for file in *.png ; do | |
magick "$file" -define webp:lossless=true -define webp:auto-filter=true -define webp:filter-strength=50 -define webp:image-hint=picture -define webp:method=6 -define webp:thread-level=1 "${file%.*}.webp" ; | |
done |
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 bash | |
# Bash needed for PIPESTATUS array | |
# Author: Viktor Dukhovni <[email protected]> (@ietf-dane) | |
# Date: 28 December 2015 | |
# From https://community.letsencrypt.org/t/making-a-dane-tlsa-to-work-with-le/2129/8 | |
# See also https://community.letsencrypt.org/t/please-avoid-3-0-1-and-3-0-2-dane-tlsa-records-with-le-certificates/7022 | |
extract() { | |
case "$4" in | |
0) openssl x509 -in "$1" -outform DER;; |
This requires recode
to be installed (brew install recode
or apt install recode
).
The example shows HTML files only. Adjust as required.
- (Recursively) find all files that end with
*.htm
or*.html
. - For each match, check its file type using
file
.
A Pen by Gwyneth Llewelyn on CodePen.
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
// To run this on the Go Playground: https://go.dev/play/p/9na7SU0ExdD | |
package main | |
import "fmt" | |
func main() { | |
country := "PT" | |
fmt.Printf("%s — Decimal: %d %d Hex: %#[1]x %#x\n", country, rune(country[0]), rune(country[1])) |
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
// See this in action: https://go.dev/play/p/mA3RRGhyZRe | |
// Read more about it: https://bitfieldconsulting.com/golang/filesystems#generalising-the-file-counter (scroll down a bit) | |
// | |
// The following code excerpt is placed in the Public Domain (CC0) by Gwyneth Llewelyn (2023) | |
package main | |
import ( | |
"fmt" | |
"io/fs" |
Suppose you need to do a copy & paste of a conversation you had on Twitter to send it by email. Unfortunately, it's very hard to copy & paste it in toto from either the app or the web. Twitter makes it as hard as possible to do so, especially if you wish the whole conversation.
Conversations are conveniently stored as JSON files, but... you need to get access to them. One possible way to do so is the following:
- Ask Twitter for a link to an archive of all your data to be downloaded (they'll take up to 24 hours to provide you with it)
- Make sure
jq
is installed - "862741-8538292" represents a conversation between two Twitter IDs (
recipientId
) - You may have to massage the first line of
direct-messages.js
so that it reads
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/sh | |
# | |
# date2exifdate shell script | |
# (tested on bash only) | |
# (c) 2022 by Gwyneth Llewelyn. Most rights reserved. | |
# | |
# Licensed under a MIT License (see https://gwyneth-llewelyn.mit-license.org/) | |
# | |
# | |
# Purpose: Change the modification date of a PSD file to the EXIF data within |
NewerOlder