I hereby claim:
- I am otherjoel on github.
- I am joeld (https://keybase.io/joeld) on keybase.
- I have a public key whose fingerprint is 3E62 C998 419D 9A17 EE0D AB81 E699 A27B 70BF 1CD8
To claim this, I am signing this object:
<?php | |
# Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
# http://creativecommons.org/publicdomain/zero/1.0/ | |
# | |
# Webmention Emailer | |
# ------------------ | |
# | |
# An incremental evolution of Jeremy Keith's "minimum viable" webmention, | |
# I've added some minimal code to have webmentions emailed to an address |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# Script to find a line in a text file (based on an environment variable) and increment a value within that line | |
# In this example, the text file has several lines of the form "<ip address>,<number>" | |
# Add a line for this IP address if it doesn't exist | |
grep -q -F $REMOTE_ADDR hits.txt || echo "$REMOTE_ADDR,0" >> hits.txt | |
# Increase the count for this IP address | |
sed -r -i 's/'"$REMOTE_ADDR"',([0-9]+)/echo "$REMOTE_ADDR,$((\1+1))"/ge' /d2a/4weeks/shipreporthits.txt |
# Load functions for validating email addresses | |
from email.utils import parseaddr | |
from dns.resolver import query | |
from dns.exception import DNSException | |
def check_address(addr): | |
addr_parsed = parseaddr(addr)[1] | |
# An empty string at this point means the address was wildly invalid | |
if addr_parsed == '': |
#!/bin/bash | |
# This script will push any changes in a local dev environment (both files and | |
# a SQL database) to a prod server. It assumes you have passwordless SSH login | |
# set up on the remote server, and that you already have a database of the same | |
# name created on the remote server. | |
# This script stores SQL usernames and passwords in plain text. If you use it, | |
# make sure you store it in a safe place, don't include it in version control, | |
# and chmod its permissions to 700! |
#lang pollen | |
◊define-meta[title]{Chapter I} | |
Travellers left and entered our car at every stopping of the train. Three persons, however, remained, bound, like myself, for the farthest station... |
#lang racket | |
(require txexpr) | |
(define (string-reverse str) | |
(list->string (reverse (string->list str)))) | |
(define (replace-first-space str) | |
(string-replace str " " " " #:all? #f)) |
Not Authenticated | |
Log In* | |
authenticate -> Authenticated | |
Authenticated | |
Reservation Display* | |
log out -> Log In | |
enter reservation -> Reservation Display | |
enter message -> Reservation Display | |
click own reservation -> Edit Reservation |
#lang racket/base | |
;; Comparing the speed of two methods for getting the first N words out of the string elements | |
;; of a tagged X-expression. | |
;; | |
;; Licensed under the Blue Oak Model License 1.0.0 (blueoakcouncil.org/license/1.0.0) | |
(require racket/list | |
txexpr) |
❯ raco pollen render another.txt example.txt | |
pollen: rendering another.txt example.txt | |
pollen: rendering /another.txt.pm | |
pollen: rendered /another.txt (421 ms) | |
pollen: rendering /example.txt.pm | |
pollen: rendered /example.txt (339 ms) | |
❯ cat another.txt | |
Result: 1 |