Skip to content

Instantly share code, notes, and snippets.

@mattdesl
mattdesl / NFT.js
Last active March 15, 2023 04:22
pseudocode for a Non-Fungible Token smart contract (see ERC721 https://eips.ethereum.org/EIPS/eip-721)
// Global Token ID counter
Counter = 0
// Mapping from Token ID to user wallet address
Database = Map<int, address>{}
// Mint/create a NFT and assign it to a new wallet address
function CreateToken (ownerAddress) {
// Limit so that only specific addresses can query this function
// i.e. only the Artist can mint new tokens of this type
@devinhunt
devinhunt / gist:8417997
Last active May 17, 2023 13:23
Coffee Shop Workplaces in London

Place to Drink Coffee and Work in London

East

100 Shoreditch High Street, London E1 6JQ

  • Coffee Espresso is great. Filter shots... not so much.
  • Wifi Free and quick.
  • Other Notes It's in the Ace Hotel, so great for meetings and easy to spread out.
@avhm
avhm / anim.js
Created July 14, 2011 09:40
Request Animation Frame Fallback
window.requestAnimFrame = (function(){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(callback){
window.setTimeout(callback, 1000 / 60);
};
})();