This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { Link } from 'react-router' | |
import * as urlTools from './url' | |
const { node, object, string, oneOfType } = React.PropTypes | |
/** | |
* A wrapper around react-router Link to add support for relative URLs | |
* and easily adding a slug. All URL's will also be normalized, this allows | |
* the use dot operators. So a URL like: `/my/bad/../path` will be normalized |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name No New Tabs | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
Array.from(document.querySelectorAll('a[target="_blank"]')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// shortcut: opt+9 | |
import "@johnlindquist/kit" | |
// Name: fade-video-clip | |
let fadeLength = 1.25 | |
let videoFile = await getSelectedFile() | |
let basePath = await path.basename(videoFile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// shortcut: opt+9 | |
import "@johnlindquist/kit" | |
// Name: fade-video-clip | |
let fadeLength = 1.25 | |
let videoFile = await getSelectedFile() | |
let basePath = await path.basename(videoFile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "@johnlindquist/kit" | |
const replaceAll = await npm('just-replace-all') | |
// Name: cut video clips | |
let cutsToMake = [ | |
{ | |
from: '00:10:40', | |
to: '00:13:22', |
OlderNewer