Skip to content

Instantly share code, notes, and snippets.

View StoneCypher's full-sized avatar

John Haugeland StoneCypher

View GitHub Profile
@StoneCypher
StoneCypher / keybase.md
Created October 26, 2017 22:31
keybase.md

Keybase proof

I hereby claim:

  • I am StoneCypher on github.
  • I am johnhaugeland (https://keybase.io/johnhaugeland) on keybase.
  • I have a public key whose fingerprint is 64BF D8FA 55C2 0A13 1F2E 33BF 5224 78B4 0318 743C

To claim this, I am signing this object:

@StoneCypher
StoneCypher / toy-cdn-react.html
Created October 19, 2017 00:40
Don't do this in prod, but when you're learning React or having fun, honestly, fuck the build toolchain entirely
<!DOCTYPE html>
<html lang="en">
<head>
<title>Toy non-Babel React from CDN example</title>
<script src="https://fb.me/react-15.0.0.js"></script>
<script src="https://fb.me/react-dom-15.0.0.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js"></script>
<script type="text/babel">
@StoneCypher
StoneCypher / .babelrc
Created October 13, 2017 17:32
fuller build setup
{
"plugins" : ["transform-flow-strip-types"],
"presets" : ["es2015", "react"],
"sourceMaps" : "inline"
}
machine_name : "Semaforo";
machine_version : 1.0.0;
machine_author : "Lorenzo Franchini";
machine_license : MIT;
machine_language : it;
fsl_version : 1.0.0;
graph_layout : dot;
no_contact => lead -> in_contact -> call_scheduled;
lead => call_scheduled => demo_completed => proposal_sent => deal_closed;
call_scheduled -> proposal_sent;
call_scheduled -> deal_closed;
[no_contact lead call_scheduled demo_completed proposal_sent deal_closed in_contact] ~> close_lost;
Whitespace
= [ \t\n\r\v]+
BlockCommentTail
= "*/"
/ . BlockCommentTail
BlockComment
= "/*" BlockCommentTail
machine_name : "eMMC Transfer Mode";
machine_version : 1.0.0;
machine_reference : ["https://www.design-reuse.com/news_img/20101001_2.gif",
"https://www.design-reuse.com/articles/24546/functional-fsm-paths-coverage-systemverilog.html"];
machine_author : "John Haugeland <stonecypher@gmail.com>";
machine_license : MIT;
jssm_version : >= 5.0.0;
graph_layout : dot;
// feed me the contents of https://raw.githubusercontent.com/github/linguist/master/lib/linguist/languages.yml
//
// helpfully after the leading comment it has no backticks; you can contain it in a template string as just a copy paste
// as long as you remove the comment part
//
// const _raw = `(paste)`;
// _raw.length; // was around 84k at the time of this writing
//
// colors_from() will return an array of the colors within
// html_view() will render a page thereof
<!doctype html>
<html>
<head>
<script type="text/javascript">
function now() { return new Date().getTime(); }
function for_n(n) {

To make an S3 bucket serve a website,

  1. go to your bucket in aws
  2. to properties
  3. open static website hosting
  4. hit enable website hosting
  5. set index document to index.html (possibly set error document too)
  6. add the bucket policy below, with your bucket's name swapped in