Skip to content

Instantly share code, notes, and snippets.

Thomas Aylott subtleGradient

View GitHub Profile
import java.lang.reflect.Method;
import android.annotation.TargetApi;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
subtleGradient / gist:a158bd0a51edd2f449c5983e66317f5a
Last active Dec 14, 2018
GatsbyJS createPages TypeScript GraphQL syntax coloring fix
View gist:a158bd0a51edd2f449c5983e66317f5a
// Copyright (C) 2018 by Things That Do Stuff, LLC - All rights reversed
// (public domain)
const gql = (templateStringParts: TemplateStringsArray, ...vars: any[]): string =>, index) => (index in vars ? part + JSON.stringify(vars[index]) : part)).join('');
export const createPages: GatsbyCreatePages = async ({ graphql, boundActionCreators }) => {
const query = gql`
site: contentfulSite(url: { eq: ${''} }) {
subtleGradient / youtube-get-the-transcript-text.bookmarklet.js
Last active Nov 1, 2018
JS Bookmarklet to Get the text content of any YouTube video that has a transcript!
View youtube-get-the-transcript-text.bookmarklet.js
javascript: void (()=>{
let text = null;
try {
text = document
subtleGradient / Docs as Wiki (tools) icon.png
Last active Sep 9, 2018
Google Docs script to Create new Document from selected text and then link selected text to that new document URL; Use Google Docs like a Wiki
View khanacademy-bouncy-hat.js
var hatY = 0;
var HATY_MAX = 106;
var defaultSpringState = {
enabled: true,
mass: 10,
friction: 3,
stiffness: 120 / 100,
subtleGradient / fiddle.html
Created Mar 19, 2018 — forked from anonymous/fiddle.html
(source: Android monkey script generator UI thing
View fiddle.html
<!-- <script src="lib/monkey keycodes.js"></script> -->
var $DeviceSerialNumber = '*'
var hook = {emit:function(){}}
View fiddle.css
#lulz {
#lulz td {
border: 2px solid black;
#lulz td.chosen {
border-color: red;
View fiddle.css
html,body{font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;}
hr{margin:2ex 0;}
div{border:4px solid #AEFFE6;background:#66FFCC;}
p {border:2px solid #66FFCC;background:#ffc;color:#cc0;}
subtleGradient / idiomatic-web-naming.html
Last active Mar 17, 2018
Web conventions for naming stuff. What is normal? What is weird? Why?
View idiomatic-web-naming.html
<!-- It's normal NOT TO indent the children of the html element -->
<!-- It's normal NOT TO indent the children of the body element -->
<div style="background-color: lime" data-moo-mar-maz="abc123" id="abc123">
<!-- It's normal TO indent the innards of almost all HTML elements -->
Hello World.
You can’t perform that action at this time.