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
did:3:kjzl6cwe1jw149x0rcxc5b3ltxrgh7nwt4pab0eg04gqvztfbr52wizt8iwkk1b |
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
from microbit import * | |
# quickly create a level of two rows, with pixels set to 0 hits and 1 hits | |
blocks = [[1 - i for j in range(5) ] for i in range(2)] | |
ball = [2, 3] | |
ball_direction = [1,-1] | |
paddle = [2, 4] | |
previous_game_time = running_time() | |
ball_timing = running_time() | |
game_time = running_time() |
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
var detectInjection = function(knownHostsArray) { | |
var requests = window.performance.getEntriesByType("resource"); | |
var unknownHosts = []; | |
var knownHosts = {}; | |
var foundHosts = {}; | |
for (var knownHost in knownHostsArray) { | |
knownHosts[knownHostsArray[knownHost]] = true; | |
} |
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 picokeypad as keypad | |
import random | |
import time | |
debug = 0 | |
keypad.init() | |
keypad.set_brightness(1.0) | |
guess = random.randint(0, 15) |
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> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Add to Homescreen</title> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="apple-mobile-web-app-title" content="Test name 2"> |
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> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Bookmarklet</title> | |
<script> | |
window.onload = function(e) { | |
var bookmark = document.getElementById("bookmark"); | |
var code = document.getElementById("code"); |
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
const applyTemplate = (templateElement, data) => { | |
const element = templateElement.content.cloneNode(true); | |
const treeWalker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, () => NodeFilter.FILTER_ACCEPT); | |
while(treeWalker.nextNode()) { | |
const node = treeWalker.currentNode; | |
for(let bindAttr in node.dataset) { | |
let isBindableAttr = (bindAttr.indexOf('bind_') == 0) ? true : false; | |
if(isBindableAttr) { | |
let dataKeyString = node.dataset[bindAttr]; |
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> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
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> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<link rel="manifest" href="https://jsbin-user-assets.s3.amazonaws.com/kinlan/manifest.json"> | |
<title>iOS Manifest Polyfill</title> | |
</head> | |
<body> |
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() { | |
// Download locally | |
function download(blob) { | |
var url = window.URL.createObjectURL(blob); | |
var a = document.createElement('a'); | |
a.style.display = 'none'; | |
a.href = url; | |
a.download = 'test.webm'; | |
document.body.appendChild(a); | |
a.click(); |