Skip to content

Instantly share code, notes, and snippets.

View themightychris's full-sized avatar

Chris Alfano themightychris

View GitHub Profile
[
{
"name":"Cheesecake Factory",
"cuisine":"American",
"id":1
},
{
"name":"Shokolaat",
"cuisine":"American",
"id":2
@themightychris
themightychris / Dockerfile
Created September 24, 2019 22:55
nginx + PHP composite Docker container
#
# Multi-Stage Docker build:
# Laravel 5.8 + PHP73 + Postgres || MySQL
#
# @link https://laravel.com/docs/5.8
# @link https://hub.docker.com/_/php
# @link https://hub.docker.com/_/mysql
# @link https://hub.docker.com/_/postgres
#
@themightychris
themightychris / TECHNO-REBELS.md
Last active February 17, 2022 16:35
Alvin Toffler's description of techno-rebels from the 1980 book The Third Wave

The Techno-Rebels

The magnitude of such an advance—its importance for the future of evolution itself—makes it critically necessary that we begin to guide it. To adopt a hands-off, damn-the-torpedoes approach could spell doom for ourselves and our children. For the power, scale, and speed of the change is like nothing before in history, and our minds are still fresh with news of the near-catastrophe at Three Mile Island, the tragic DC-10 crashes, the hard-to-plug massive oil spill off the Mexican coast, and a hundred other technological horrors. Faced with such disasters, can we permit the development and combination of tomorrow’s even more powerful technologies to be controlled by the same shortsighted and selfish criteria used during the Second Wave era?

The basic questions asked of new technologies during the past three hundred years, in both capitalist and socialist nations, have been simple: do they contribute to economic gain or military clout? These twin criteria are clearly no longer adequate. New

@themightychris
themightychris / EMERGENCE-MONITORING.md
Last active May 29, 2021 09:31
emergence monitoring

Monitor emergence services with goaccess and netdata

@themightychris
themightychris / users.toml
Created August 25, 2020 19:44
Slate gitsheets schema
[gitsheet]
root = "users"
path = "${{ id > 0 ? Math.floor(id/1000)*1000 || '0000' : 'pending' }}/${{ id }}"
[gitsheet.fields.id]
default = -1
[gitsheet.fields.contact_points]
sort = [ 'id == null', 'slot', 'id', 'kind', 'label', 'data' ]
@themightychris
themightychris / README.md
Last active July 27, 2020 14:19
Emergence: Backup to B2 via Restic
@themightychris
themightychris / test-organizations.json
Last active March 25, 2020 12:48
CfAPI test organizations
[
{
"name": "Code for Philly",
"website": "https://codeforphilly.org",
"events_url": "https://www.meetup.com/Code-for-Philly/",
"rss": "http://codeforphilly.org/project-updates?format=rss",
"projects_list_url": "http://codeforphilly.org/projects.csv",
"city": "Philadelphia, PA",
"latitude": "39.9523",
"longitude": "-75.1638",
@themightychris
themightychris / config--env
Created October 22, 2019 20:40
Habitat plan.sh for Laravel application
#!{{pkgPathFor "core/bash"}}/bin/bash -e
if [ -f '{{pkg.svc_var_path}}/key' ]; then
APP_KEY="$(cat '{{pkg.svc_var_path}}/key')"
fi
APP_DEBUG='{{#if cfg.app.debug}}true{{/if}}'
APP_ENV='{{#if cfg.app.env}}{{cfg.app.env}}{{else}}production{{/if}}'
APP_URL='{{cfg.app.url}}'
@themightychris
themightychris / README.md
Last active January 27, 2020 06:04
De-parent an emergence site

Prepare vfs-site projection

Optionally, begin the vfs-site projection branch with a snapshot of the legacy VFS:

emergence-source-http-legacy pull mysite.example.org

# using tree hash output at end of pull command
TREE_HASH=4b825dc642cb6eb9a060e54bf8d69288fbee4904
git commit-tree -m "snapshot mysite.example.org" "${TREE_HASH}"
@themightychris
themightychris / default.toml
Created October 22, 2019 20:45
Habitat composite plan
[services.postgresql]
pkg_ident = "core/postgresql11"
[services.myapp]
pkg_ident = "myorigin/myapp"
[services.myapp.binds]
database = "postgresql"
[services.nginx]
pkg_ident = "emergence/nginx"