Skip to content

Instantly share code, notes, and snippets.

View laurengarcia's full-sized avatar

Lauren Garcia laurengarcia

  • Somewhere, everywhere.
View GitHub Profile
@laurengarcia
laurengarcia / mspt-tokenuri.js
Last active July 24, 2020 00:11
MSPT (Microsponsors Time Slot) Token URI Metadata
// MSPT tokens (Microsponsors Time Slot)
// Metadata Sketch for tokenURI()
// OpenSea Docs:
// docs.opensea.io/docs/2-adding-metadata
// docs.opensea.io/docs/metadata-standards
// Example:
// https://opensea-creatures-api.herokuapp.com/api/creature/3
{
"name": "MSPT #220: <propertyName>", // MSPT on-chain data
@laurengarcia
laurengarcia / nginx.conf
Created February 19, 2020 23:55 — forked from opaolini/nginx.conf
Mesh Example with certbot
upstream meshws {
server mesh:60559;
}
server {
listen 443 ssl;
server_name ${SERVERNAME};
ssl_certificate /etc/letsencrypt/live/${SERVERNAME}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${SERVERNAME}/privkey.pem;
@laurengarcia
laurengarcia / eventemitter.js
Created December 12, 2019 18:08 — forked from mudge/eventemitter.js
A very simple EventEmitter in pure JavaScript (suitable for both node.js and browsers).
/* Polyfill indexOf. */
var indexOf;
if (typeof Array.prototype.indexOf === 'function') {
indexOf = function (haystack, needle) {
return haystack.indexOf(needle);
};
} else {
indexOf = function (haystack, needle) {
var i = 0, length = haystack.length, idx = -1, found = false;
@laurengarcia
laurengarcia / index.js
Created June 21, 2016 06:25
requirebin sketch
const choo = require('choo')
const app = choo()
function view (params, state, send) {
return choo.view`
<main>
@laurengarcia
laurengarcia / index.js
Last active June 21, 2016 05:35
requirebin sketch
const choo = require('choo')
const dragdrop = require('drag-drop')
const app = choo()
function view (params, state, send) {
return choo.view`
<main>
var hyperdrive = require('hyperdrive')
var concat = require('concat-stream')
var memdb = require('memdb')
var drop = require('drag-drop')
var fileReader = require('filereader-stream')
var choppa = require('choppa')
var swarm = require('hyperdrive-archive-swarm')
var db = memdb('./hyperdrive620')
var drive = hyperdrive(db)
var explorer = require('./')
- app
- lib
(our OOP nouns all live here whether they are services, factories or providers:
basically, anything that affects the state of a given noun - i.e. User - across components)
- api-client-service
- payment-service
- search-service
- search-filter-factory
- swagger-service
- user-service
@laurengarcia
laurengarcia / Javascript patterns -> Coffeescript
Last active December 31, 2015 15:59
Common Javascript patterns translated into their Coffeescript equivalents for reference.
# the not not operator
# equivalent in js:
# if (!!farts) { alert("many " + farts); }
alert "many " + farts unless not farts
# Self invoking anonymous function
do ->