Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael J Erwin metame

View GitHub Profile
@metame
metame / angularServer.js
Last active Aug 29, 2015
barebones express http server to serve Angular files
View angularServer.js
var express = require('express'),
app = express(),
path = require('path'),
port = process.env.PORT || 8000;
// Place all angular files in /app directory
app.use(express.static(path.join(__dirname,'/app')));
// Require any bower dependencies in html files at 'localhost:port/bower_components/*'
app.use('/bower_components', express.static(path.join(__dirname,'/bower_components')));
@metame
metame / rot13.js
Created Sep 4, 2015
cipher can be run with cli using node
View rot13.js
// es2015
'use strict';
// run from cli as `babel rot13.js "string"`
let entry = process.argv[2];
entry => {
const alphabet = "abcdefghijklmnopqrstuvwxyz";
let outString = '';
@metame
metame / objectDotNotation.js
Created Nov 9, 2015
Converts all JavaScript object bracket selectors with JavaScript object dot notation within file
View objectDotNotation.js
'use strict';
// may result in mixed object notation if a [var] || [fn] value is used within a object notation > 2 levels
// also will result in mixed object notation if a non-converting ["k-e-y"] is nested (e.g. [][]) with a converting ["key"].
// Run with ES6 compatible runtime (recent Node or Babel) `node objectDotNotation.js file.js outFile.js` or
// `const dotIt = require('objectDotNotation')
// dotIt('file.js','outFile.js');
const fs = require('fs'),
file = process.argv[2],
outFile = process.argv[3];
@metame
metame / deepEqual.js
Last active Jan 4, 2017
deepEqual - yes, there are other deepEqual fn's but this is built for debugging to log where they're not equal
View deepEqual.js
/**
* takes 2 objects and compares each property recursively
* @param {Object} o1 - 1st object
* @param {Object} o2 - 2nd object
* @returns {boolean}
*/
function deepEqual(o1, o2){
const o1string = tryStringify(o1);
const o2string = tryStringify(o2);
View gist:cf4dc32dcb78cd8ba6f545efffbeb8c5
Verifying my Blockstack ID is secured with the address 1u9cCMbdPoiP2curJHeGw6f2RhGVPaEXv https://explorer.blockstack.org/address/1u9cCMbdPoiP2curJHeGw6f2RhGVPaEXv
View state-society-rules.md

State Rules

Citizens who demonstrate a Pattern of participation in Conflict may be banned from the State.

What is a Society?

The goal of a Society is to encourage friendships, mentorships, and collaborations aligned with the State’s goals.

A Society is open to participation from anyone with any background, assuming that participation is aligned with the goals of the State.