This is a SCRIPT-8 cassette.
This file contains hidden or 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
Verifying that +stopsatgreen is my blockchain ID. https://onename.com/stopsatgreen |
This file contains hidden or 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
// Create new Promise | |
function get(url) { | |
return new Promise(function(resolve, reject) { | |
var req = new XMLHttpRequest(); | |
req.open('GET', url); | |
req.onload = function() { | |
if (req.status == 200) { | |
resolve(req.response); | |
} else { |
This file contains hidden or 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
<?php | |
// Because I don’t use PHP often enough to remember it instantly | |
$opts = array( | |
'http'=>array( | |
'method'=>"GET", | |
'header'=>"Accept: application/json" | |
) | |
); | |
$context = stream_context_create($opts); |
This file contains hidden or 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
var foo = new SpeechSynthesisUtterance('Hello world'); | |
window.speechSynthesis.speak(foo); |
This file contains hidden or 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
//Flexbox | |
@mixin flex-display() { | |
display: -ms-flexbox; | |
display: -webkit-box; | |
display: -webkit-flex; | |
display: flex; | |
} | |
@mixin flex-align-items($arg: stretch) { |
This file contains hidden or 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
<snippet> | |
<content><![CDATA[ | |
<!DOCTYPE HTML> | |
<html> | |
<head lang="en"> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="viewport" content="width=device-width"> | |
<title>[[TITLE GOES HERE]]</title> | |
<!-- Styles --> |
This file contains hidden or 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 hasPlaceHolder() { | |
return 'placeholder' in document.createElement('input'); | |
} | |
function html5forms() { | |
var formPlaceholder = hasPlaceHolder(); | |
if (formPlaceholder === false) { | |
$('input[type=text]').each(function() { | |
if($(this).attr('placeholder')) { | |
var placeholderText = $(this).attr('placeholder'); |
This file contains hidden or 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 findDistance() { | |
'use strict'; | |
var hasGeoLocation = navigator.geolocation ? true : false; | |
if (hasGeoLocation) { | |
var toLat, toLon, fromLat, fromLon, dLat, dLon, R, a, c, d, distance; | |
navigator.geolocation.getCurrentPosition(function(position) { | |
// Define the toRad function for later calculation | |
if (typeof(Number.prototype.toRad) === 'undefined') { | |
Number.prototype.toRad = function() { | |
return this * Math.PI / 180; |