Skip to content

Instantly share code, notes, and snippets.

View metame's full-sized avatar

metame metame

  • The meta Method
  • United States
View GitHub Profile

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.

Verifying my Blockstack ID is secured with the address 1u9cCMbdPoiP2curJHeGw6f2RhGVPaEXv https://explorer.blockstack.org/address/1u9cCMbdPoiP2curJHeGw6f2RhGVPaEXv
@metame
metame / deepEqual.js
Last active January 4, 2017 18:50
deepEqual - yes, there are other deepEqual fn's but this is built for debugging to log where they're not equal
/**
* 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);
@metame
metame / objectDotNotation.js
Created November 9, 2015 01:57
Converts all JavaScript object bracket selectors with JavaScript object dot notation within file
'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 / rot13.js
Created September 4, 2015 21:30
cipher can be run with cli using node
// es2015
'use strict';
// run from cli as `babel rot13.js "string"`
let entry = process.argv[2];
entry => {
const alphabet = "abcdefghijklmnopqrstuvwxyz";
let outString = '';
@metame
metame / angularServer.js
Last active August 29, 2015 14:23
barebones express http server to serve Angular files
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')));