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
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
maxogden / bibtex.png
Last active Jan 25, 2020
How to make a scientific looking PDF from markdown (with bibliography)
@maxogden
maxogden / index.sh
Last active Jan 23, 2020
generate ES512 and RS256 elliptic curve keypairs for JWT JWK (JSON Web Token JSON Web Key) using openssl
View index.sh
# 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
maxogden / 0.md
Last active Jan 6, 2020
JS hoisting by example
View 0.md

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
maxogden / readme.md
Created Feb 4, 2017
my book duo (16tb) linux format
View readme.md
  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>
print
rm 1 (and others)
mklabel gpt
unit TB
@maxogden
maxogden / readme.md
Last active Dec 24, 2019
notes from hacking my kindle paperwhite
View readme.md

outline

useful hacks

@maxogden
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
maxogden / readme.md
Last active Dec 19, 2019
federal data servers
View readme.md

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

901441 "rockyftp.cr.usgs.gov"
    259 "ghrc.nsstc.nasa.gov"
    185 "acdisc.gsfc.nasa.gov"
    158 "ftp2.census.gov"
    119 "podaac-ftp.jpl.nasa.gov"
     73 "gpm.nsstc.nasa.gov"
     71 "airbornescience.nsstc.nasa.gov"
@maxogden
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 = window.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
game.appendTo(container)
View readme.md

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-logo-substack

  • 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.