Skip to content

Instantly share code, notes, and snippets.

View lgs's full-sized avatar

Luca G. Soave lgs

View GitHub Profile
const SECRET_KEY = ENTER YOUR SECRET KEY HERE;
const MAX_TOKENS = 200;
// For more cool AI snippets and demos, follow me on Twitter: https://twitter.com/_abi_
/**
* Completes your prompt with GPT-3
*
* @param {string} prompt Prompt
* @param {number} temperature (Optional) Temperature. 1 is super creative while 0 is very exact and precise. Defaults to 0.4.
@lgs
lgs / FlashLoanReceiverBase.sol
Created August 17, 2022 19:08 — forked from DappaDanDev/FlashLoanReceiverBase.sol
Creating a Flash Loan using Aave
pragma solidity ^0.6.6;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/docs-v3.x/contracts/math/SafeMath.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/docs-v3.x/contracts/token/ERC20/IERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/docs-v3.x/contracts/token/ERC20/SafeERC20.sol";
import "./IFlashLoanReceiver.sol";
import "./ILendingPoolAddressesProvider.sol";
import "./Withdrawable.sol";
abstract contract FlashLoanReceiverBase is IFlashLoanReceiver, Withdrawable {
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
@lgs
lgs / allowed.list
Created May 12, 2022 10:14 — forked from sven-hash/allowed.list
Allowed URL
nymtech.net
ifconfig.me
iplocation.net
rgbfaq.com
notrustverify.cn
nym.notrustverify.ch
mempool.space
duckduckgo.com

Keybase proof

I hereby claim:

  • I am lgs on github.
  • I am lgskb (https://keybase.io/lgskb) on keybase.
  • I have a public key ASDGKlDS-WHTXb8QLlNj8FHPIm6kH4csmnaC3X5_z7ozJAo

To claim this, I am signing this object:

@lgs
lgs / Gemfile
Created July 4, 2012 19:00 — forked from smd686s/Gemfile
Goliath.io with Grape and MongoDB
gem 'mongo'
gem 'em-mongo'
gem 'bson_ext'
gem 'goliath'
gem 'grape'
@lgs
lgs / Generate NFT Marketplace Polygon
Created September 5, 2021 09:05 — forked from evanVtatum/Generate NFT Marketplace Polygon
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"
}'
@lgs
lgs / gist:ba460eecbd846373eeb1d7ca1c6f8b78
Created June 27, 2021 14:03
npm run build fails locally
> Using @sveltejs/adapter-netlify
TypeError: render2 is not a function
at Object.handle (file:///home/lsoave/Svelte/sveltekit-stripe-netlify/.svelte-kit/output/server/app.js:74:26)
at respond (file:///home/lsoave/Svelte/sveltekit-stripe-netlify/node_modules/@sveltejs/kit/dist/ssr.js:1514:30)
at Module.render (file:///home/lsoave/Svelte/sveltekit-stripe-netlify/.svelte-kit/output/server/app.js:205:10)
at visit (file:///home/lsoave/Svelte/sveltekit-stripe-netlify/node_modules/@sveltejs/kit/dist/chunks/index6.js:129:30)
at prerender (file:///home/lsoave/Svelte/sveltekit-stripe-netlify/node_modules/@sveltejs/kit/dist/chunks/index6.js:243:11)
at async Object.prerender (file:///home/lsoave/Svelte/sveltekit-stripe-netlify/node_modules/@sveltejs/kit/dist/chunks/index6.js:310:5)
at async adapt (file:///home/lsoave/Svelte/sveltekit-stripe-netlify/node_modules/@sveltejs/adapter-netlify/index.js:33:4)
at async adapt (file:///home/lsoave/Svelte/sveltekit-stripe-netlify/node_modules/@sveltej
@lgs
lgs / PinataPartyContract.cdc
Created June 5, 2021 08:59 — forked from polluterofminds/PinataPartyContract.cdc
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})
@lgs
lgs / .gitignore
Created November 9, 2013 23:00 — forked from karmi/.gitignore
.DS_Store