Skip to content

Instantly share code, notes, and snippets.

View tylerbuchea's full-sized avatar
💭
Hello World!

Tyler tylerbuchea

💭
Hello World!
View GitHub Profile
[
"238TiUaK4b7wz25gHsLggtz2zSafERYybA5xoxNr4SHv",
"25Zbxtk92esi9wU92zqkziFrzSwDkaLauJ5JqSkbhau1",
"26dy98GpZjVqzaY7LSPqjvHDtriJrBUv9Zi2zTqTDQwy",
"26qqFE98F3Md2rw6aTeZTJXmKJFjGBRFHxLq7u6D1ivg",
"27VD5AJkkp3Q7UqXsMzHJ8jUAhGmCdU46RYTFhTvB8ac",
"29KDfJZVvDWt8TMMbepd7henJhTtbqb5fhPRPYJZ6K7B",
"29kQg4izNqtN1r8svkTKWnyTHrGghX5UnRSGNkUALY6h",
"2AQjfRZkHJn9P6w99RFMUCcXwNRJPnf7t6zF9FiLdmSP",
"2CrNZQWY4mjyUzd3Jyc8GF9qFppwdpoWPoapw3jB3Kpk",
This file has been truncated, but you can view the full file.
[
{
"crawl_id": "1454131228142735360",
"mint": "EXdJDLGeQfXaLd5MXcq2PcDLbtqn8iFJiz6GdgRhfjeb",
"name": "ChickenTribe #69",
"image": "https://weaver.moonrank.app/psRI5_E2ikK9qYKR0zrw4L_XQ8GgG3NFa6CSuZ0Crd8?ext=png",
"created": 1635526805,
"rank": 1,
"rarity": 5.080526342529085e-32,
"rank_explain": [
@tylerbuchea
tylerbuchea / digital-ocean-ghost-blog-update.md
Last active March 6, 2020 04:45
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/id_rsa.pub file to Dropbox
# 2. Then reset Digital Ocean root password
# 3. Login through the Digital Ocean web console using new password
@tylerbuchea
tylerbuchea / textNodesUnder.js
Last active November 23, 2019 15:07
Get all text values under a specific node
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
tylerbuchea / example.js
Created May 18, 2019 03:37 — forked from nicolashery/example.js
Combine a pipe of multiple Node.js streams into one stream
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) {
chunks1.push(chunk.toString());
var pieces = (soFar + chunk).split('\n');
class Copy {
static language = 'en';
static languageMap = {
en: { Hello: 'Hello' },
sp: { Hello: 'Hola' },
};
set language(language) {
Copy.language = language;
}
// First install decorator plugin: yarn install core-decorators
//
// Then add the plugin to your .babelrc:
// {
// ...
// "env": {
// "development": {
// "plugins": [
// ...
// "transform-decorators-legacy"
# 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 {
repositoryOwner(login:"facebook"){
repository(name:"react") {
id
name
@tylerbuchea
tylerbuchea / combineContext.js
Created March 28, 2018 18:54 — forked from etienne-dldc/combineContext.js
A small function to combine react Contexts.
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
tylerbuchea / invisible-recpatcha.md
Last active January 13, 2018 00:16
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

<html>
<head>
  <script src="https://www.google.com/recaptcha/api.js"></script>