Skip to content

Instantly share code, notes, and snippets.

View lgs's full-sized avatar

Luca G. Soave lgs

View GitHub Profile
@evanVtatum
evanVtatum / Generate NFT Marketplace Polygon
Created August 23, 2021 14:56
Generate NFT Marketplace Polygon
curl --location --request POST 'https://api-eu1.tatum.io/v3/blockchain/marketplace/listing' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data-raw '{
"feeRecipient": "0x8cb76aEd9C5e336ef961265c6079C14e9cD3D2eA",
"marketplaceFee": 250,
"chain": "MATIC",
"fromPrivateKey": "0x37b091fc4ce46a56da643f021254612551dbe0944679a6e09cb5724d3085c9ab"
}'
@polluterofminds
polluterofminds / PinataPartyContract.cdc
Last active November 18, 2022 10:23
Full PinataPartyContract
pub contract PinataPartyContract {
pub resource NFT {
pub let id: UInt64
init(initID: UInt64) {
self.id = initID
}
}
pub resource interface NFTReceiver {
pub fun deposit(token: @NFT, metadata: {String : String})
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
<script>
import { stores } from '@sapper/app';
import { onMount } from 'svelte';
import {loadStripe} from '@stripe/stripe-js';
let paymentToken = '';
let paymentError;
const { preloading, page, session } = stores();
$ : unitName = ($page.params && $page.params.unitName) ? $page.params.unitName[0] : ''; // The reactive part here I read the params to know about what is the selected unit by the user
@antony
antony / bash.sh
Last active February 8, 2022 01:36
Auth0 SSR Compatible Integration with Sapper
npm install --save express express-openid-connect
@tobiaslins
tobiaslins / worker.js
Last active July 30, 2024 20:11
Notion Custom Domain using Cloudflare Workers + Splitbee Analytics
const MY_DOMAIN = "help.splitbee.io"
const START_PAGE = "https://www.notion.so/splitbee/Help-Center-bbf26e2b70574901b9c98e5d11e449de"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, HEAD, POST,PUT, OPTIONS",
@mayneyao
mayneyao / notion2blog.js
Last active April 6, 2025 01:54
Notion.so > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = "agodrich.com"
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2"
const DISQUS_SHORTNAME = "agodrich"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
const { setContext } = require('apollo-link-context');
const { HttpLink } = require('apollo-link-http');
const { introspectSchema, makeRemoteExecutableSchema } = require('graphql-tools');
const fetch = require('node-fetch');
module.exports = function(api) {
api.createSchema(async function(graphql) {
const http = new HttpLink({
uri: 'http://example.com/api',
fetch
@nabrown
nabrown / grams-final.html
Last active June 21, 2020 22:46
Instagram Gallery - Complete
<!DOCTYPE html>
<html>
<head>
<title>Instagram Gallery</title>
<script src="https://unpkg.com/[email protected]/dist/vue.min.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<style type="text/css">
:root{
--color: #95e9ef;
--background: #1f1f1f;
@taitems
taitems / plate-snitch.js
Created August 20, 2017 03:56
(Extract) Check the status of a vehicle registration and scrape results.
// Open form and submit enquire for `rego`
function getInfo(rego) {
horseman
.userAgent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0')
.open(url)
.type('#registration-number-ctrl input[type=text]', rego)
.click('.btn-holder input')
.waitForSelector('.ctrl-holder.ctrl-readonly')
.html()
.then(function(body) {