Skip to content

Instantly share code, notes, and snippets.

✌( ͡ᵔ ͜ʖ ͡ᵔ )✌

Max Ogden maxogden

✌( ͡ᵔ ͜ʖ ͡ᵔ )✌
Block or report user

Report or block maxogden

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
maxogden / GeoJSON.js
Created Nov 16, 2011
google maps polygon editor
View GeoJSON.js
var app = {markers: []};
function serializePolygon(gpoly) {
var gjp = {
"type": "Polygon",
"coordinates": []
for (var i = 0; i < gpoly.latLngs.length; i++) {
gjp.coordinates[i] = []
var ring = gpoly.latLngs.getAt(i)
maxogden / bibtex.png
Last active Jan 25, 2020
How to make a scientific looking PDF from markdown (with bibliography)
maxogden /
Last active Jan 23, 2020
generate ES512 and RS256 elliptic curve keypairs for JWT JWK (JSON Web Token JSON Web Key) using openssl
# RS256
# private key
openssl genrsa -out rs256-4096-private.rsa 4096
# public key
openssl rsa -in rs256-4096-private.rsa -pubout > rs256-4096-public.pem
# ES512
# private key
openssl ecparam -genkey -name secp521r1 -noout -out ecdsa-p521-private.pem
# public key
maxogden /
Last active Jan 6, 2020
JS hoisting by example

JavaScript function hoisting by example

Below are many examples of function hoisting behavior in JavaScript. Ones marked as works successfuly print 'hi!' without errors.

To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js

Notes on hoisting

(I may be using incorrect terms below, please forgive me)

maxogden /
Created Feb 4, 2017
my book duo (16tb) linux format
  1. install WD Drive Utilities on Mac OS
  2. convert to JBOD/EXFAT and turn off Drive Sleep
  3. plug into linux
sudo parted /dev/sd<num>
rm 1 (and others)
mklabel gpt
unit TB
maxogden /
Last active Dec 24, 2019
notes from hacking my kindle paperwhite


useful hacks

maxogden / index.js
Last active Dec 19, 2019
youtube playlist downloader
View index.js
var path = require('path')
var fs = require('fs')
var ytdl = require('youtube-dl')
function playlist (url) {
var video = ytdl(url) // add , ['--audio-format=mp3'] for mp3 only
video.on('error', function error (err) {
console.log('error 2:', err)
maxogden /
Last active Dec 19, 2019
federal data servers

ftp servers referenced from metadata (count is many urls on each server are in the metadata):

901441 ""
    259 ""
    185 ""
    158 ""
    119 ""
     73 ""
     71 ""
maxogden / index.js
Last active Dec 17, 2019
smooth voxel terrain
View index.js
var createGame = require('voxel-engine')
var isosurface = require('isosurface')
var game = = createGame({meshType: "wireMesh"})
var THREE = game.THREE
// rotate camera to look straight down
game.controls.pitchObject.rotation.x = -1.5
var container = document.body

Disclaimer: This is an unofficial post by a random person from the community. I am not an official representative of io.js. Want to ask a question? open an issue on the node-forward discussions repo

io.js - what you need to know


  • io is a fork of node v0.12 (the next stable version of node.js, currently unreleased)
  • io.js will be totally compatible with node.js
  • the people who created io.js are node core contributors who have different ideas on how to run the project
  • it is not a zero-sum game. many core contributors will help maintain both node.js and io.js
You can’t perform that action at this time.