⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,
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
{ | |
"dependencies": { | |
"@llama-node/llama-cpp": "^0.0.32", | |
"llama-node": "^0.0.32" | |
}, | |
"devDependencies": { | |
"@types/node": "^18.16.3" | |
} | |
} |
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 zsh -f | |
# Purpose: rename PDFs by their creation date | |
# | |
# From: Timothy J. Luoma | |
# Mail: luomat at gmail dot com | |
# Date: 2019-12-26 | |
NAME="$0:t:r" | |
if [[ -e "$HOME/.path" ]] |
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 zsh -f | |
# Purpose: count PDF pages with a variety of tools | |
# | |
# From: Timothy J. Luoma | |
# Mail: luomat at gmail dot com | |
# Date: 2019-12-23 | |
NAME="$0:t:r" | |
if [[ -e "$HOME/.path" ]] |
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 zsh -f | |
# Purpose: use 'file' command to make sure image files have proper extension | |
# | |
# From: Timothy J. Luoma | |
# Mail: luomat at gmail dot com | |
# Date: 2019-10-04 | |
NAME="$0:t:r" | |
if [[ -e "$HOME/.path" ]] |
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 python3 | |
''' | |
calisuck: index, filter-out smartly and download ebooks from Calibre open directories | |
Installation: | |
You need python 3.5 installed | |
Download the file as a zip and unzip-it and get into the dir |
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 | |
# Remove a textual watermark from a PDF file. Requires qpdf and pdftx | |
# to work correctly. The correct usage is | |
# | |
# remove-watermark WATERMARK "Your Input File.pdf" "Your Output File.pdf" | |
WATERMARK=$1 | |
INBOUND=$2 | |
OUTBOUND=$3 |
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
<script type="text/javascript"> | |
/** | |
* Prevent double entry submissions. | |
* | |
* Steps to install: | |
* 1 - Download and activate the "Insert Headers and Footers" plugin (by WPBeginner) | |
* 2 - Go to Settings > Insert Headers and Footers | |
* 3 - Paste this entire code snippet | |
* 4 - Save | |
*/ |
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
<# | |
.Synopsis | |
Parses html files produced by Google Takeout to present Google Voice call and text history in a useful way. | |
.DESCRIPTION | |
When exporting Google Voice data using the Google Takeout service, the data is delivered in the form | |
of many individual .html files, one for each call (placed, received, or missed), each text message | |
conversation, and each voicemail or recorded call. For heavy users of Google Voice, this could mean many | |
thousands of individual files, all located in a single directory. This script parses all of the html | |
files to collect details of each call or message and outputs them as an object which can then be | |
manipulated further within powershell or exported to a file. |
NewerOlder