Skip to content

Instantly share code, notes, and snippets.

View seitsu's full-sized avatar

Tobias Sattler seitsu

View GitHub Profile
@seitsu
seitsu / flightphp-twig.php
Last active May 13, 2020 07:22
Skeleton app for Flight PHP 1.3.8 with Twig 3.x
<?php
// load composer autoloader
require dirname(__DIR__) . '/vendor/autoload.php';
// set paths for templates and cache
Flight::set('flight.views.path', dirname(__DIR__) . '/templates');
Flight::set('flight.compiled.views.path', dirname(__DIR__) . '/var/cache');
// set the view renderer to use twig. Before deploying to prod. activate the cache and
// set the web user allowed to read/write from/to the folder.
@seitsu
seitsu / epp-poll-registry-maintenance-json.txt
Last active May 19, 2020 06:47
EPP Poll Message for Registry Maintenance Notification
EPP Poll Message for Registry Maintenance Notification based on the JSON format of https://gist.github.com/seitsu/ef08e37847d69c0963b4d3c5309d4052
Example Poll:
S:<?xml version="1.0" encoding="UTF-8" standalone="no"?>
S:<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
S: <response>
S: <result code="1301">
S: <msg>Command completed successfully; ack to dequeue</msg>
S: </result>
S: <msgQ count="4" id="12346">
@seitsu
seitsu / machine-readable-registry-maintenance-notification-rss.txt
Last active May 19, 2020 06:47
Machine-readable Registry Maintenance Notification RSS Feed
Machine-readable registry maintenance notifications as RSS 2.0 feeds (https://validator.w3.org/feed/docs/rss2.html) on port 443:
GET https://status.registry.tld/maintenance-production.rss
GET https://status.registry.tld/maintenance-test.rss
GET https://status.registry.tld/maintenance-staging.rss
GET https://status.registry.tld/maintenance-all.rss
Response for maintenance-production.rss:
HTTP Response Code 200 (RFC 7231)
content-type: application/rss+xml
@seitsu
seitsu / machine-readable-registry-maintenance-notification-json.txt
Last active May 19, 2020 06:47
Machine-readable Registry Maintenance Notification JSON
Machine-readable registry maintenance notifications through RESTful webservice on port 443 with JSON formatted response (RFC 4627):
GET https://status.registry.tld/maintenance
Arguments
- environment [optional] (string) 'production', 'test', 'staging' or 'all' (default: production)
- start [optional] (date) according ISO 8601 YYYY-MM-DD (default: today)
- end [optional] (date) according ISO 8601 YYYY-MM-DD (default: today + 3 months)
Example call: GET https://status.registry.tld/maintenance?environment=production&start=2017-04-01&end=2017-06-30