0x1709b2ce35876503e5af34cbfc2716d4fad2cb900d684bb14f1f84f3eeafb6fb
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
/** | |
* @OnlyCurrentDoc | |
*/ | |
function onOpen() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var menuEntries = [ | |
{name: "Export Tags", functionName: "exportSheet"}, | |
{name: "Export Tag Definition", functionName: "exportTagDefinition"} | |
]; |
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
type FileNft = { | |
path: string, | |
name: string | |
} | |
export async function storeDirectory(files: FileNft[]) { | |
try { | |
const client = new NFTStorage({ | |
token: process.env.NFT_STORAGE_KEY as string, |
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
const description = "My nft is cool, this is the image number: 1" | |
const attributes = [{ | |
trait_type: 'Hair', | |
value: 'None' | |
}] | |
const dataNft = await uploadNFTStorage(`./output/images/${items[i].tokenId}.png`, `${items[i].tokenId}`, description, attributes); | |
const info: TokenIpfs = { | |
name: 'Image 1', |
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
type NftResponse = { | |
url: string, | |
ipnft: string, | |
ipfsImage: string, | |
hostedImage: string | |
} | |
export async function uploadNFTStorage( | |
path: string, |
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
const web3 = new Web3(context.library.provider); | |
const thingToSave = { | |
message: 'Hello world', | |
owner: address, | |
}; | |
const hashedData = web3.eth.accounts.hashMessage( | |
JSON.stringify(thingToSave) | |
); |
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
name: Default Service - PRO | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest |
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
// This is the start of the flow, the CLIENT app redirects to this page | |
app.get('/api/auth/webex', (req, res) => { | |
// The webex_client_id is an environment variable extracted from the Create integration https://developer.webex.com/docs/integrations | |
// The scopes and redirect uri are also defined when creating the integration | |
// Remind to put there your domain url ex: myapp.com or localhost for development | |
// You will need to change also all the scopes query parameters of this url (you will get them from the "create integration process") | |
const authUrl = `https://webexapis.com/v1/authorize?client_id=${process.env.WEBEX_CLIENT_ID}&response_type=code&redirect_uri=${encodeURIComponent(process.env.BASE_URL)}%2Fapi%2Fauth%2Fwebex%2Fcallback&scope=meeting%3Arecordings_read%20spark%3Aall%20spark%3Akms%20meeting%3Aschedules_read%20meeting%3Apreferences_write%20meeting%3Arecordings_write%20meeting%3Apreferences_read%20meeting%3Aschedules_write&state=set_state_here` | |
// We do a redirect to the webex oauth U |
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
const canvas = document.getElementById('canvas'); | |
const context = canvas.getContext('2d'); | |
let before = Date.now() | |
let dt = 0 | |
const totalFigures = 50 | |
const figures = [] |
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 update(dt) { | |
const speed = 100 // We can have a different speed per square if we want | |
figures.forEach(figure => { | |
figure.x = figure.x + (dt * speed ) > canvas.width ? 0 : figure.x + (dt * speed) | |
}) | |
} |
NewerOlder