Skip to content

Instantly share code, notes, and snippets.

@mderazon
mderazon / url-check.md
Last active May 30, 2020 14:30 — forked from oscarb/README.md
Formula to check if website in cell A1 in a Google Spreadsheet is up, using the W3C HTML Checker API

Validate URL in a Google Spreadsheet

Formula to check if URL in cell A1 in a Google Spreadsheet is up, using the W3C HTML Checker API

Formula

=IF(A1<>"",IF(ISERROR(FIND("non-document-error", INDEX(IMPORTDATA("https://validator.w3.org/nu/?out=json&doc=" & A1),0,2))),"✓","✗"),"")

Output

#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@mderazon
mderazon / 0_reuse_code.js
Created October 30, 2013 09:04
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
<textarea name="my-xml-editor" data-editor="xml" rows="15"></textarea>
...
<textarea name="my-markdown-editor" data-editor="markdown" rows="15"></textarea>
...
<script src="//d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js"></script>
<script>
// Hook up ACE editor to all textareas with data-editor attribute
$(function () {
$('textarea[data-editor]').each(function () {