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 getEntryForRegisteredPrefix(name) { | |
for (var i = 0; i < NDN.CSTable.length; i++) { | |
console.log(NDN.CSTable[i], name); | |
var entry = new Name(NDN.CSTable[i].name); | |
var interestName = new Interest(entry); | |
if (interestName.matches_name(new Name(name)) == true){ | |
console.log('Match!!!', NDN.CSTable[i], name); | |
return NDN.CSTable[i]; | |
} | |
} |
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 proc = {} | |
module.exports = proc; | |
var msCh = new MessageChannel() | |
var queue = []; | |
msCh.port1.onmessage = function(ev) { | |
var source = ev.source; | |
if ( ev.data === 'proc-tick') { | |
if (queue.length > 0) { | |
var fn = queue.shift(); |
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
//Object DetectSubtleCrypto() | |
//Establish the availability of various crypto.subtle API's necessary for keygen, signing, verification, hashing | |
function DetectSubtleCrypto(){ | |
var supportedApis = {}; | |
var baselineSupport = ( | |
(crypto && crypto.subtle) | |
&& ( | |
(location.protocol === "https:" || "chrome-extension:" || "chrome:") | |
|| (location.hostname === "localhost" || location.hostname === "127.0.0.1") | |
) |
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 testGenerateImportExport(cipher){ | |
return crypto.subtle.generateKey(cipher, true, cipher.usage).then(function(keys){ | |
if (keys.type === "secret") //only one secret key (e.g. with HMAC) | |
cipher.keys = [keys]; | |
else | |
cipher.keys = [keys.privateKey, keys.publicKey]; | |
var exportProms = []; | |
for (var i = 0; i < cipher.keys.length; i++){ | |
exportProms.push(crypto.subtle.exportKey("jwk", cipher.keys[i])); |
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
Setlist for 27th | |
Intro/Outro padding gimmies: | |
- franklins tower | |
- you don’t know how it feels | |
- I know you rider | |
- catfish john | |
- can’t you see | |
- can’t always get what you want |
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
javascript:(function() { | |
function extractText(element) { | |
if (element.nodeType === Node.TEXT_NODE) { | |
return element.textContent.trim() + ' '; | |
} | |
if (element.nodeType !== Node.ELEMENT_NODE) { | |
return ''; | |
} | |
let text = ''; | |
for (const child of element.childNodes) { |
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 publishGist(button) { | |
if (localStorage.getItem("gistTokenName")) { | |
// get the gist token and publish the gist | |
const tokenName = localStorage.getItem("gistTokenName"); | |
const tokenValue = localStorage.getItem("gistTokenValue"); | |
const codeElement = button.nextElementSibling; | |
const gistPayload = { | |
description: "My Gist", | |
public: 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
function publishGist(button) { | |
if (localStorage.getItem("gistTokenName")) { | |
// get the gist token and publish the gist | |
const tokenName = localStorage.getItem("gistTokenName"); | |
const tokenValue = localStorage.getItem("gistTokenValue"); | |
const codeElement = button.nextElementSibling; | |
const gistPayload = { | |
description: "My Gist", | |
public: 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
function publishGist(button) { | |
if (localStorage.getItem("gistTokenName")) { | |
// get the gist token and publish the gist | |
const tokenName = localStorage.getItem("gistTokenName"); | |
const tokenValue = localStorage.getItem("gistTokenValue"); | |
const codeElement = button.nextElementSibling; | |
const gistPayload = { | |
description: "My Gist", | |
public: 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
// ==UserScript== | |
// @name New script - github.com | |
// @namespace Violentmonkey Scripts | |
// @match https://github.com/* | |
// @grant none | |
// @version 1.0 | |
// ==/UserScript== | |
function publishGist(button) { | |
if (localStorage.getItem("gistTokenName")) { | |
// get the gist token and publish the gist |
OlderNewer