Skip to content

Instantly share code, notes, and snippets.

View tayiorbeii's full-sized avatar

Taylor Bell tayiorbeii

View GitHub Profile
@tayiorbeii
tayiorbeii / Link.jsx
Created April 14, 2016 15:28
Link.jsx is a wrapper for react-router's Link that adds some helper functionality for things like relative links.
@tayiorbeii
tayiorbeii / 0_reuse_code.js
Created January 22, 2017 03:59
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tayiorbeii
tayiorbeii / vimeo_downloader.py
Created February 24, 2017 17:18
Usage: `python vimeo_downloader.py http://...master.json optional_name.mp4` modified from https://gist.github.com/alexeygrigorev/a1bc540925054b71e1a7268e50ad55cd
import requests
import base64
from tqdm import tqdm
import sys
master_json_url = sys.argv[1]
base_url = master_json_url[:master_json_url.rfind('/', 0, -26) + 1]
resp = requests.get(master_json_url)
content = resp.json()
// original from: http://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
// original gist: https://gist.github.com/willpatera/ee41ae374d3c9839c2d6
function doGet(e){
return handleResponse(e);
}
// Enter sheet name where data is to be written below
var SHEET_NAME = "Sheet1";
@tayiorbeii
tayiorbeii / subscribeForm.js
Created June 27, 2018 02:06
Example React ContactForm component that submits an email address to a Google Spreadsheet as well as a Mailchimp list via a Gatsby plugin following client side evaluation. The classnames are from Tachyons.io
import React, { Component } from 'react'
import axios from 'axios'
import validator from 'email-validator'
import addToMailchimp from 'gatsby-plugin-mailchimp'
// Directions here: https://medium.com/@dmccoy/how-to-submit-an-html-form-to-google-sheets-without-google-forms-b833952cc175
const formUrl = 'https://script.google.com/macros/s/YourKeyHere/exec'
const mailchimpUrl = 'https://REGION.api.mailchimp.com/3.0'
@tayiorbeii
tayiorbeii / notWorkingWithStaticQuery.js
Last active July 18, 2018 21:40
Gatsby StaticQuery Errors
// src/pages/index.js
import React from 'react'
import {StaticQuery, graphql} from 'gatsby'
import Layout from '../components/layout'
// const HomePage = ({data}) => {
// return (
// <Layout>
// {data.site.siteMetadata.description}
@tayiorbeii
tayiorbeii / noNewTabs.js
Created August 2, 2018 20:57
Userscript to remove target=_blank
// ==UserScript==
// @name No New Tabs
// @match *://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
Array.from(document.querySelectorAll('a[target="_blank"]'))
// shortcut: opt+9
import "@johnlindquist/kit"
// Name: fade-video-clip
let fadeLength = 1.25
let videoFile = await getSelectedFile()
let basePath = await path.basename(videoFile)
// shortcut: opt+9
import "@johnlindquist/kit"
// Name: fade-video-clip
let fadeLength = 1.25
let videoFile = await getSelectedFile()
let basePath = await path.basename(videoFile)
import "@johnlindquist/kit"
const replaceAll = await npm('just-replace-all')
// Name: cut video clips
let cutsToMake = [
{
from: '00:10:40',
to: '00:13:22',