Skip to content

Instantly share code, notes, and snippets.

View curiositry's full-sized avatar

Curiositry curiositry

View GitHub Profile
Search:
(?<!\b[A-Z][a-z]{3}|th|whil|i)(?:e|s)((?:\s|(?:\n){2})(?:"|\*)?[A-Z])
Replace:
.\1
@curiositry
curiositry / loop.hbs
Created November 5, 2022 20:04
Alternate weblog loop.hbs (goes in partials directory) with a lable next to featured posts instead of the date.
{{! Previous/next page links - only displayed on page 2+ }}
{{#if pagination.prev}}
<br>
<div class="center-text">
page {{pagination.page}} of {{pagination.pages}}
</div>
<br>
{{/if}}
{{! The loop itself }}
@curiositry
curiositry / ghost_mysql_on_flyio.sh
Last active September 28, 2022 19:09
Run Ghost + MySQL 8 In Production on Fly.io Free Tier (see: https://www.autodidacts.io/host-ghost-mysql8-on-fly-io-free-tier/)
# Prompt for app name
echo -n "Enter App Name: " && \
read appname && \
echo -n "Enter MYSQL password: " && \
read mysqlpassword && \
echo -n "Enter MYSQL Root password: " && \
read mysqlrootpassword && \
# Heredoc wrapper for tidyness (starting now, because we can't seem to prompt for input within heredoc)
bash << EOF
# Inspect script first if you are leery of pipe-to-bash
@curiositry
curiositry / weblog_code_injection_example.html
Last active May 20, 2022 01:22
Example of customizing weblog via CSS code injection
<style>
.main-header a {
color: blue;
}
.main-header a:hover,
.main-header a:visited {
color: darkblue;
}
@curiositry
curiositry / ghost_on_flyio.sh
Last active September 8, 2022 19:35
Ghost on Fly.io
# Prompt for app name
read -p "Enter App Name: " appname </dev/tty && \
# Heredoc wrapper for tidyness (starting now, because we can't seem to prompt for input within heredoc)
bash << EOF
# Inspect script first if you are leery of pipe-to-bash
curl -L https://fly.io/install.sh | sh
# This will open a browser, where you can enter a username and password, and your credit card (which is required even for free tier, for fraud prevention).
flyctl auth signup
# Create a directory for the project and enter it, since the next command will output a file
mkdir ghost-flyio && cd ghost-flyio
@curiositry
curiositry / main-header.hbs
Last active April 11, 2022 04:27
Get rid of Weblog membership links
<header class="main-header center-text" id="main-header">
<div class="container">
{{#if @site.logo}}
<div class="main-header__logo">
<a href="{{@site.url}}">
<img src="{{@site.logo}}" alt="{{@site.title}} Logo" />
</a>
</div>
{{/if}}
@curiositry
curiositry / responsive-navigation-snippet.html
Created March 14, 2022 23:13
Weblog responsive navigation (paste into your code injection pane)
<style>
.menu-toggle {
display: block;
}
header nav.hidden {
display: none;
}
@media all and (min-width: 800px) {
@curiositry
curiositry / page-tags.hbs
Last active July 28, 2021 23:32
Ghost Tags List
{{!< default}}
{{> content-header}}
<main class="container content" id="content">
<article class="page {{post_class}}">
{{#post}}
@curiositry
curiositry / gist:805b034ce430dbfdd23d08e756f26ff3
Last active April 23, 2023 06:04
Disable weblog hanging punctuation
<style>
.content ul {
padding-inline-start: 1rem !important;
}
.content ol {
padding-inline-start: 2rem !important;
}
</style>
@curiositry
curiositry / gist:83574872889778e6027f638150c45f59
Last active May 26, 2022 20:06
Change weblog text width (paste into your blog's code injection)
<style>
:root {
--container-width: 1000px;
}
</style>