Skip to content

Instantly share code, notes, and snippets.

View freethejazz's full-sized avatar

Jonathan Freeman freethejazz

View GitHub Profile
@freethejazz
freethejazz / accessor-iterator.js
Created August 31, 2013 20:06
accessor properties (getter/setters) used to create a simple iterators. Inspired by @eu96ne
/*
* A limited example of using getters/setters as a way to iterate over a range
* some background info at: freeman.blogspot.com/2013/07/javascript-getters-and-setters-last.html
*/
// Simple Array Iterator
//
// Expects array
var SimpleArrayIterator = function(arr){
this.arr = arr;
/**********************
* Here are the code snippets from my InfoWorld article
* on JavaScript, properly formatted. Original article
* can be found here:
*
* http://www.infoworld.com/d/application-development/6-secrets-of-javascript-jedis-231322
*
**********************/
// ** Closures **
@freethejazz
freethejazz / docker-compose.yml
Last active June 14, 2019 14:56
Simple neo4j docker-compose
neo4j:
image: neo4j:latest
ports:
- "7474:7474"
- "7687:7687"
environment:
NEO4J_AUTH: "none"
@freethejazz
freethejazz / 0_reuse_code.js
Created April 19, 2016 17:00
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@freethejazz
freethejazz / graph_gist_template.adoc
Last active February 16, 2017 02:06 — forked from jexp/graph_gist_template.adoc
CHANGEME: GraphGist Template. Fork to make your own, view source to see instruction comments

Coal Tar Soap, the next generation of mixology

Introduction

Verifying my Blockstack ID is secured with the address 13fUAkQcqgfNxNssTHt7y3WsuwZv97hC6B https://explorer.blockstack.org/address/13fUAkQcqgfNxNssTHt7y3WsuwZv97hC6B
@freethejazz
freethejazz / data-schema-from-postgres.sql
Created December 13, 2021 22:43
Get a data table of entities, fields, and types out of a postgres schema
-- Roughly get a entity/field/type table from a parameterized schema
-- A bit buggy, as it currently duplicates some rows (particularly join tables)
SELECT
cols.table_name,
cols.column_name,
cols.ordinal_position,
cols.column_default,
cols.data_type,
CASE WHEN pks.column_name IS NOT NULL
THEN TRUE