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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Screen and Microphone Recorder</title> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
line-height: 1.6; |
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
function withTimeout( | |
asyncFn, | |
timeoutMins = 5 | |
) { | |
return function asyncFnWithTimeout(job) { | |
return new Promise((resolve, reject) => { | |
const timer = setTimeout(() => { | |
return reject(new Error(`Job timed out after ${timeoutMins} minutes`)); | |
}, parseInt(timeoutMins) * 60 * 1000); |
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
// requires ?id=<GOOGLE_SHEET_ID> | |
// you must have authorized access to the spreadsheet | |
function doGet(request) { | |
if (!request.parameter.id) { | |
return ContentService.createTextOutput(JSON.stringify(new Error('no Google Sheet id set'))) | |
.setMimeType(ContentService.MimeType.JSON); | |
} | |
var cache = getNotesAndFormulas(request.parameter.id); | |
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
<!-- CSS --> | |
<style id="jsbin-css"> | |
#pricing { | |
font-family: PT Sans; | |
} | |
#monthly-traffic, | |
#order-size{ | |
display: block; | |
width: 100%; |
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
/* Paste in the console to fill in the blanks */ | |
console.log("but \uD83D\uDCA9 it was 99\u00A2"); |
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
/* | |
* A quick example of how to use Bluebird and Q to conjure your own promises | |
* | |
* Everything going on here is explained further in the following video: | |
* http://youtu.be/OU7WuVGSuZw?list=PLT-DLWOBKbB4dZ83I_7Ca-sUTvorckG-E | |
* | |
*/ | |
// Import node modules | |
var Q = require('q'); |
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
# GeekTool command for displaying surf conditions from Magic Seaweed (there's gotta be a better way to do this) | |
# created by: Dan Thareja | |
# To use: create new 'shell' geeklet and copy the following curl command into the 'command box' | |
curl -s 'http://magicseaweed.com/Encuentro-Surf-Report/478/' | awk -F 'msw-js-fcc' '{print $2}' | grep '6am' | awk -F '6am' '{print $3}' | sed 's/"secondary":[^}]*//' | sed 's/"tertiary":[^}]*//' | awk -F '"' '{print ""$29" "$10"ft @ "$32"s | "$86" "$93""}' | sed 's/://g' | sed 's/,//g'; | |
# This will print today's 6am surf conditions in Encuentro | |
# formatted as: [swell.compassDirection] [swell.height] @ [swell.period]s | [wind.speed] [wind.direction] |