Skip to content

Instantly share code, notes, and snippets.

View davenaylor's full-sized avatar

Dave Naylor davenaylor

View GitHub Profile
@hypervtechnics
hypervtechnics / TUTORIAL.md
Last active December 22, 2023 08:45
Gotify and Caddy with Systemd

How to install Gotify with Caddy

In this guide I assume you want to use SQLite as storage mechanism. I used Ubuntu 18.04 but there should be no real differences between the different versions/distributions as long as it has systemd installed.

All commands are executed as root. If you do not want to do this, prefix them with sudo [command].

You'll need the tool unzip. If you didn't install it yet or don't know if it is installed just execute apt install -y unzip.

Parts of this guide are taken from this guide and are modified for Gotify.

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ 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,

@jeremybise
jeremybise / baseof.html
Last active August 3, 2025 13:34
Google Fonts via config with Hugo
<!-- Wherever your head tag is located, add the new partial -->
<head>
{{ partial "google-fonts" . }}
</head>
@joepie91
joepie91 / .md
Last active October 10, 2025 14:37
Running a Node.js application using nvm as a systemd service

Read this first!

Hi there! Since this post was originally written, nvm has gained some new tools, and some people have suggested alternative (and potentially better) approaches for modern systems. Make sure to have a look at the comments to this article, before following this guide!


The original article

Trickier than it seems.

@tomazzaman
tomazzaman / hhvm.conf
Last active May 13, 2021 19:44
Monit configurations for commonly used services
check process hhvm with pidfile /var/run/hhvm/pid
group hhvm
start program = "/usr/sbin/service hhvm start" with timeout 60 seconds
stop program = "/usr/sbin/service hhvm stop"
if failed unixsocket /var/run/hhvm/hhvm.sock then restart
if mem > 400.0 MB for 1 cycles then restart
if 5 restarts with 5 cycles then timeout
@jmdodd
jmdodd / gist:1458820
Created December 11, 2011 06:19
Set custom post type and taxonomy terms with Ozh' Tweet Archiver
<?php
if ( ! function_exists( 'ucc_ozh_ta_insert_tweets_post' ) ) {
function ucc_ozh_ta_insert_tweets_post( $data ) {
// Replace values of [tax_input][category] and [post_type] with appropriate values.
$data['tax_input']['category'] = '1,2';
$data['post_type'] = 'tweet';
return $data;
} }
add_filter( 'ozh_ta_insert_tweets_post' , 'ucc_ozh_ta_insert_tweets_post' );