Skip to content

Instantly share code, notes, and snippets.

View rjcorwin's full-sized avatar

R.J. (Steinert) Corwin rjcorwin

View GitHub Profile
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
#!/bin/sh
DOMAIN="p2p.earth"
EMAIL="[email protected]"
echo ""
echo "Starting proxy and ssl companion."
echo ""
docker run -d -p 80:80 -p 443:443 \
//
// Conditional statements.
//
// Simple.
var text1 = `Numbers are great, ${1 === 1 ? '1 is equal to 1' : '1 is not equal to 1. Uh oh.'}.`
console.log(text1)
// Advanced.
var text2 = `Numbers are great, ${(()=>{
# Go to our app codebase. I keep a version of repositories for running build using -clean
# because before a build we blow away ALL the things.
cd ~/Git/tangerine-community/tangerine-clean/
git reset --hard
git clean -xfd
# Checkout out the latest v3.x.x branch. You may have a tag you want to checkout instead.
git fetch origin
git checkout origin/v3.x.x
import { Component,
ViewChild,
AfterViewInit,
ElementRef } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})

Dockerize

What is Docker?

Docker is a tool for practicing "Immutable Infrastructure".

Immutable infrastructure is generally defined as a stack that you build once (be it a virtual machine image, container image, or something else), run one or many instances of, and never change again.

-- https://www.oreilly.com/ideas/an-introduction-to-immutable-infrastructure

What is a container?

let testDoc = {
"_id": "1d902ea3-4d9d-f7d6-dc0c-d76e75de7dc0",
"formId": "demoForm",
"model": {
"prepopulated_variable_1": "foo",
"prepopulated_variable_2": "bar",
"variable1": "asfd",
"variable2": "jk",
"favorite_fruit": "undefined",
"favorite_color": "blue",
{
"_id": "caa33075-2dec-7f85-9772-adc5872a00cf",
"formId": "demoForm",
"model": {
"prepopulated_variable_1": "foo",
"prepopulated_variable_2": "bar",
"pear": true,
"mango": true
},
"date": 1500921085177,
@rjcorwin
rjcorwin / index.html
Last active July 14, 2017 06:38
A document that live edits itself for all those beaker browsers watching it with live reloading turned on.
<html id="content">
<head>
<script>
var selfArchive = new DatArchive('' + window.location)
var state = (document.getElementById('content')).outerHTML
// Counter for the number of state changes thus commits.
var i = 0
async function saveIt() {

Phase 1

done

  • Editors define app and form pages
  • List and Resume form sessions
  • CSV export of a form's session data
  • PWA features for offline tangerine

to do