Skip to content

Instantly share code, notes, and snippets.

View owise1's full-sized avatar
🔮
...

Oliver Wise owise1

🔮
...
View GitHub Profile
@doctorzhivago
doctorzhivago / manage-db.js
Last active May 13, 2021 00:54
Establish an IPNS name that points to a file containing an OrbitDB address
const createClient = require('ipfs-http-client');
const OrbitDB = require('orbit-db');
require('buffer');
const toBuffer = require('it-to-buffer');
const LOG='orbit*';
// NOTE: This runs via node.js 14.x +
// This was only tested with a go-ipfs node running on the same
// device on port 5001
// ==UserScript==
// @name Convert post to Gutenberg
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Convert Wordpress classic posts to Gutenberg layout
// @author Micah Engle-Eshleman
// @include /^https:\/\/subdomain\.domain\.com\/wp-admin\/post.php\?post=\d+&action=edit/
// @grant none
// ==/UserScript==
@anaptfox
anaptfox / amazon-polly-speaker.js
Last active May 24, 2020 00:14
Node.js Amazon Polly to speaker example.
// Load the SDK
const AWS = require('aws-sdk')
const Stream = require('stream')
const Speaker = require('speaker')
// Create an Polly client
const Polly = new AWS.Polly({
signatureVersion: 'v4',
region: 'us-east-1'
})
@silviolorusso
silviolorusso / index.coffee
Created June 17, 2014 17:49
tumblr-2-epub
tumblr = require 'tumblr'
cheerio = require 'cheerio'
Tumblr2Peepub = (tumblrConfig) ->
that = this
this.tumblrConfig = tumblrConfig
allPosts = []
totalPosts = false
bookDoc = {}
@axelpale
axelpale / combinations.js
Last active July 7, 2023 10:37
JavaScript functions to calculate combinations of elements in Array.
/**
* Copyright 2012 Akseli Palén.
* Created 2012-07-15.
* Licensed under the MIT license.
*
* <license>
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
@paolorossi
paolorossi / html5-video-streamer.js
Created March 7, 2012 13:21
Node.js HTML5 video streamer
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';
@msmith
msmith / couchdb-ec2-install.sh
Created August 25, 2011 17:26
Set up CouchDB on EC2
#!/bin/bash
#
# This script installs and configures couchdb on a fresh Amazon Linux AMI instance.
#
# Must be run with root privileges
# Tested with Amazon Linux AMI release 2011.02.1.1 (ami-8c1fece5)
#
export BUILD_DIR="$PWD"