Skip to content

Instantly share code, notes, and snippets.

View billiegoose's full-sized avatar

Billie Hilton billiegoose

View GitHub Profile
@billiegoose
billiegoose / NFT.sol
Last active April 8, 2021 02:57
NFTs 4 All - v1
// SPDX-License-Identifier: MIT
// by William Hilton (https://github.com/wmhilton)
// written using remix.ethereum.org
pragma solidity >=0.8.3 <0.9.0;
/**
* @dev ERC-721 interface for accepting safe transfers.
* See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md.
*/
interface ERC721TokenReceiver {
@billiegoose
billiegoose / README.md
Created August 30, 2019 03:20
SCRIPT-8
@billiegoose
billiegoose / index.html
Last active January 30, 2020 05:43
magic portal (isomorphic-git)
<div>
<input id="repository" type="text" style="width: 50em" title="Tip: enter a private repo URL to see the credentialManager plugin prompt for a password.">
<button type="button" id="cloneButton">Clone</button>
</div>
<output id="log" style="white-space: pre; font-family: monospace;"></output>
<script src="https://unpkg.com/magic-portal"></script>
<script>
let worker = new Worker("./worker.js")
@billiegoose
billiegoose / index.html
Created November 25, 2018 21:31
worker-gist (isomorphic-git)
<div>
<input id="repository" type="text" style="width: 50em" title="Tip: enter a private repo URL to see the credentialManager plugin prompt for a password.">
<button type="button" onClick="clone()" id="cloneButton">Clone</button>
</div>
<output id="log" style="white-space: pre; font-family: monospace;"></output>
<script src="./proxyReceiver.js"></script>
<script src="./proxySender.js"></script>
<script>
let worker = new Worker("./worker.js")
@billiegoose
billiegoose / AutoHotkey.ahk
Last active August 16, 2024 19:25
Hotkey to Toggle Screen Resolution
#b::
Width := QueryScreenWidth()
if (Width = 3840) {
ChangeResolution(1920, 1080)
} else {
ChangeResolution(3840, 2160)
}
QueryScreenWidth()
{
@billiegoose
billiegoose / DatArchive.md
Last active October 26, 2017 22:51
Musings on BeakerBrowser compatibility

Browser must have a global DatArchive object. https://beakerbrowser.com/docs/apis/dat.html

I think these ones could be supported in a client-side script using BrowserFS

  • new DatArchive(url)
  • DatArchive.create(opts?)
  • DatArchive.fork(url, opts?)
  • DatArchive.selectArchive(opts?)
  • DatArchive.resolveName(url)
  • url
@billiegoose
billiegoose / index.js
Created August 20, 2017 04:51
requirebin sketch
var signalhub = require('signalhub')
var hub = signalhub('my-app', [
'https://signalhub-jccqtwhdwc.now.sh/'
])
hub.subscribe('my-channel')
.on('data', function (message) {
console.log('new message received', message)
})
@billiegoose
billiegoose / storageQuota.js
Created March 13, 2017 22:04
StorageQuota polyfill
// MIT License, Copyright William Hilton <wmhilton@gmail.com>
// Implement the proposed W3C Quota Management API (circa 2017)
navigator.storageQuota = {
get supportedTypes () {
let types = []
if (navigator.webkitTemporaryStorage) types.push('temporary')
if (navigator.webkitPersistentStorage) types.push('persistent')
return types
},
queryInfo (type) {
@billiegoose
billiegoose / app.html
Created January 20, 2017 02:58
Replace internal links with history.pushState based navigation but leave external links unmodified
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
</head>
<body>
<a href="/app.html">app.html</a>
<br>
@billiegoose
billiegoose / wmhilton.id
Last active November 14, 2016 06:56
Verifying that "wmhilton.id" is my Blockstack ID. https://onename.com/wmhilton
Verifying that "wmhilton.id" is my Blockstack ID. https://onename.com/wmhilton