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 / 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:
View await-to-js.js
* @param { Promise } promise
* @param { Object= } errorExt - Additional Information you can pass to the err object
* @return { Promise }
function to(promise, errorExt) {
return promise
.then(function (data) { return [null, data]; })
.catch(function (err) {
if (errorExt) {
tylerbuchea / cloudSettings
Last active Aug 29, 2018
Visual Studio Code Settings Sync Gist
View cloudSettings
You can’t perform that action at this time.