Skip to content

Instantly share code, notes, and snippets.

Hello World!

Tyler Buchea tylerbuchea

Hello World!
Block or report user

Report or block tylerbuchea

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
tylerbuchea /
Last active Mar 6, 2020
Digital Ocean Ghost Blog Update

I used Digital Ocean's One-Click install for Ghost blog some time ago and then I wanted to update it. It ended up being more work then I'd hoped so hopefully this helps someone.

If you get locked out

# If you get locked out of your droplet:
# 1. upload your ~/.ssh/ file to Dropbox
# 2. Then reset Digital Ocean root password
# 3. Login through the Digital Ocean web console using new password
tylerbuchea / textNodesUnder.js
Last active Nov 23, 2019
Get all text values under a specific node
View textNodesUnder.js
function textNodesUnder(node){
const all = [];
for (node = node.firstChild; node; node = node.nextSibling){
if (node.nodeType === 3) all.push(node);
else all = all.concat(textNodesUnder(node));
return all;
let selector = '';
tylerbuchea / example.js
Created May 18, 2019 — forked from nicolashery/example.js
Combine a pipe of multiple Node.js streams into one stream
View example.js
var util = require('util')
, Transform = require('stream').Transform
, StreamCombiner = require('./streamcombiner');
var chunks1 = [];
var stream1 = new Transform();
var soFar = '';
stream1._transform = function(chunk, encoding, done) {
var pieces = (soFar + chunk).split('\n');
View Copy.js
class Copy {
static language = 'en';
static languageMap = {
en: { Hello: 'Hello' },
sp: { Hello: 'Hola' },
set language(language) {
Copy.language = language;
View redux.js
// First install decorator plugin: yarn install core-decorators
// Then add the plugin to your .babelrc:
// {
// ...
// "env": {
// "development": {
// "plugins": [
// ...
// "transform-decorators-legacy"
View Issue Leaderboard Tracker Product Feedback
# Type queries into this side of the screen, and you will
# see intelligent typeaheads aware of the current GraphQL type schema,
# live syntax, and validation errors highlighted within the text.
# We'll get you started with a simple query showing your username!
query {
repository(name:"react") {
tylerbuchea / combineContext.js
Created Mar 28, 2018 — forked from etienne-dldc/combineContext.js
A small function to combine react Contexts.
View combineContext.js
import React from 'react';
function onlyChild(children) {
return Array.isArray(children) ? children[0] : children;
export function combineContext(contexts) {
class Provider extends React.Component {
render() {
const init = this.props.children;
tylerbuchea /
Last active Jan 13, 2018
Google Invisible reCAPTCHA Client & Server Example

The documentation is sparse below is a simple working example of a Invisible reCAPTCHA client server setup using client side JavaScript and a NodeJS server.

This example is setup as a very simple voting API endpoint where you POST your email along with your reCAPTCHA response. The API will return a different message along with the submitted email depending on wether you passed the reCAPTCHA challenge or not.

Invisible HTML component

  <script src=""></script>
tylerbuchea / docker-compose-single-host.yml
Created Jan 8, 2018
Docker Compose Single Host NGINX Proxy
View docker-compose-single-host.yml
version: "3.2"
image: jwilder/nginx-proxy
- "3000:80" # change to "80:80" for production
- /var/run/docker.sock:/tmp/docker.sock:ro
tylerbuchea /
Last active Jan 3, 2018
Provision Docker Swarm on Digital Ocean
set -e
# Must fill these values out for the script to work
# For more info check out:
# Dockers Machine Digital Ocean Driver:
# Docker Swarm:
You can’t perform that action at this time.