Skip to content

Instantly share code, notes, and snippets.

View indexzero's full-sized avatar
🌎
Always bet on Open Source

Charlie Robbins indexzero

🌎
Always bet on Open Source
View GitHub Profile
@indexzero
indexzero / ISC.md
Created April 13, 2014 21:00
ISC vs. MIT

Copyright (c) 4-digit year, Company or Person's Name

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Source: http://opensource.org/licenses/ISC

@indexzero
indexzero / ssh2-tunnel.js
Last active February 4, 2024 05:47
Thoughts about SSH tunnellng using `ssh2`
var fs = require('fs'),
path = require('path');
Connection = require('ssh2');
var tunnelHost = process.argv[2],
dest = process.argv[3],
keyfile = process.argv[4];
var conn = new Connection();
@indexzero
indexzero / PRINCIPALS.md
Last active November 10, 2023 03:50
Principles of Note: a list of select principles that have been particularly useful in helping design, refine, and debug complex systems (both computer & human)

Principles of Note

A list of select principles that have been particularly useful in helping design, refine, and debug complex systems (both computer & human)

Any organization that designs a system (defined broadly) will produce a design hose structure is a copy of the organization's communication structure.

@indexzero
indexzero / i18n-time-intervals.js
Created June 29, 2017 18:33
Generate a 24 hour range of 30-minute time intervals that are i18n compatible
let items = [];
for (var hour = 0; hour < 24; hour++) {
items.push([hour, 0]);
items.push([hour, 30]);
}
const date = new Date();
const formatter = new Intl.DateTimeFormat('en-US', {
hour: 'numeric',
minute: 'numeric',
@indexzero
indexzero / .gitignore.yahrzeit
Last active February 4, 2023 18:27
Simple Yahrzeit calculator using Hebcal package
# Ignore things not in the gist
*
!facade.js
!hebcal.js
!README.md
!temporal.js
!why.png
@indexzero
indexzero / mockreadwritestream.js
Created May 20, 2011 06:26
A mock stream for node.js that is both Readable and Writeable.
var events = require('events'),
util = require('util');
var MockReadWriteStream = helpers.MockReadWriteStream = function () {
//
// No need to do anything here, it's just a mock.
//
};
util.inherits(MockReadWriteStream, events.EventEmitter);
@indexzero
indexzero / continents.json
Last active March 26, 2022 21:21
Where in the world is a good JSON mapping of all continents?
{
"Afghanistan": "Asia",
"Aland Islands": "Europe",
"Albania": "Europe",
"Algeria": "Africa",
"Andorra": "Europe",
"Angola": "Africa",
"Anguilla": "North America",
"Antigua and Barbuda": "North America",
"Argentina": "South America",
@indexzero
indexzero / npm-downloads-2022.txt
Last active February 17, 2022 05:03
Total downloads for indexzero in last-month: 399,423,177
@exemplar/native-storybook: 7
@exemplar/storybook: 9
@exemplar/storybook-react: 35
@exemplar/storybook-react-native: 6
@gasket/assets: 310
@gasket/cli: 641
@gasket/data: 225
@gasket/engine: 505
@gasket/fetch: 212
@gasket/helper-intl: 230
@indexzero
indexzero / index.html
Last active May 5, 2021 03:08
A simple sq footage calculator
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<link href="styles.css" media="screen" rel="stylesheet" type="text/css">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script type="text/javascript" src="sq-foot.js"></script>
</head>
<body>
@indexzero
indexzero / base64.js
Created November 27, 2010 23:38
An extremely simple implementation of base64 encoding / decoding using node.js Buffers
//
// Super simple base64 encoding / decoding with node.js
//
var base64 = exports = {
encode: function (unencoded) {
return new Buffer(unencoded).toString('base64');
},
decode: function (encoded) {
return new Buffer(encoded, 'base64').toString('utf8');