⁨ascclemens⁩ avatar

⁨Anna Clemens⁩'s pastes

⁨11⁩ ⁨pastes⁩

public ⁨3⁩ ⁨files⁩ 2019-01-21 05:51:49 UTC
README.md
# Outdated

See [this repo](https://gitlab.com/jkcclemens/note) for more updates.

- `note.sh` is the file to be sourced
- `_note` is a zsh shell completion file
public ⁨1⁩ ⁨file⁩ 2018-11-10 05:21:42 UTC
nginx_cloudflare.sh
#!/bin/sh

(curl -sSf https://www.cloudflare.com/ips-v4 && curl -sSf https://www.cloudflare.com/ips-v6) | \
  while read -r line; do echo "set_real_ip_from $line;"; done

echo
echo "real_ip_header CF-Connecting-IP;"
public ⁨1⁩ ⁨file⁩ 2018-11-10 03:44:02 UTC
.md
![bitcoin-chan](https://pbs.twimg.com/media/DqJo4XUU8AAVUcl.jpg:large)
public ⁨1⁩ ⁨file⁩ 2018-10-31 16:45:19 UTC
.md
# Adding custom fonts to Apple Books

I haven't found any resources on the web for how to do this, so I dove into `Books.app` and figured out how to add your own fonts to the font list in Apple Books.

![example](https://kyleclemens.com/assets/Screenshot%202018-10-31%20at%2012.36.10.png)
*Bookerly is now available.*
public ⁨1⁩ ⁨file⁩ 2018-09-08 07:14:29 UTC
.md
[Watch it.](https://www.youtube.com/watch?v=sHAkDTlv8fA)

<small>I typed this from 2 to 3:30 in the morning, so forgive me if grammar is wonky or there are misspellings spellcheck didn't catch.</small>
public ⁨1⁩ ⁨file⁩ 2018-07-06 00:43:14 UTC
.md
```
This is a pre that is first child.
```

This is a bare link: https://github.com/jkcclemens/paste/commit/80279084d90cd493bb26d239fb966fdde159eea7.

Here is another bare link: https://www.youtube.com/watch?v=IHNzOHi8sJs&feature=youtu.be.

This is a bare link (https://paste.gg/users/jkcclemens) to our site!
public ⁨1⁩ ⁨file⁩ 2018-06-14 19:07:15 UTC
.md
Hello!

I'm the primary developer of this pastebin that you're on right now (hopefully).  It's called
[paste](https://github.com/jkcclemens/paste), and it's my baby.

I'd like to take a moment to write down why this project got started and where I want it to go, just
so anyone who's new to it can get a sense of what's going on.

## I miss good pastebins.

Markdown rendering

It's finally here!

public ⁨2⁩ ⁨files⁩ 2018-06-14 15:08:44 UTC
number two.md
Don't worry, though! It's safe from <script>alert('evil attackers');</script> trying to do mean things.

Click the `Source` tab above to see what I mean!

fixup! catcher

pre-push git hook to catch "fixup!" commits

public ⁨1⁩ ⁨file⁩ 2018-06-14 14:10:36 UTC
pre-push.rs
#![feature(process_exitcode_placeholder)]

extern crate git2;

use git2::{Repository, Oid};

use std::io::{Read, stdin};
use std::process::ExitCode;

fn pushees() -> Vec<Pushee> {

Store migration script

Use this to migrate your old store format to the new store format

public ⁨1⁩ ⁨file⁩ 2018-05-14 01:02:41 UTC
store.py
# make backups!
# make sure psycopg2 is installed (pip install psycopg2)

# edit this to connect to your database
DATABASE_URL = 'postgres://paste@/paste'

# this script will move directories from your old store into a new store, both defined by the
# variables below.
OLD_STORE = 'old_store'
NEW_STORE = 'store'
public ⁨1⁩ ⁨file⁩ 2018-05-03 15:36:55 UTC
email.rs
/// Check if an email is valid.
///
/// This is a slightly-modified port of Firefox's input validation state machine.
///
/// This function explicitly allows single-character domain names, since some do exist.
fn check_email(email: &str) -> bool {
  const ALLOWED: &[u8] = &[
    b'.', b'!', b'#', b'$', b'%', b'&', b'\'', b'*', b'+', b'-',