Skip to content

Instantly share code, notes, and snippets.

@windsok
windsok / receiving inscriptions and ordinals with sparrow wallet.md
Last active April 25, 2024 08:07
receiving inscriptions and ordinals with sparrow wallet
@Hero-Development
Hero-Development / web3-mint.js
Last active December 28, 2021 10:06
Minting example using Web3.js, prechecks the transaction for errors
const handleMintClick = async (evt) => {
if( evt && evt.cancelable )
evt.preventDefault();
try{
//usually returns a BN (BigNumber)
const priceBN = await contract.methods.PRICE().call();
const quantityBN = new Web3.utils.BN( `${quantity}` );
const valueBN = priceBN.mul( quantityBN );
const blockhash = "0x5cb3e33c31019c9e5f77f354f150e4d74eb95a029a69738d45c176bc1447e444"
const fs = require("fs").promises
const seedrandom = require("seedrandom")
const chooser = require("random-seed-weighted-chooser").default
const SparkMD5 = require("spark-md5")
const random = seedrandom(blockhash)
const uniques = [{
@gfenney
gfenney / update_opensea.py
Last active February 24, 2023 10:30 — forked from sudo-owen/update_opensea.py
Update OpenSea metadata
import requests
import time
# change the address here to be your desired NFT
url = "https://api.opensea.io/asset/0x772c9181b0596229ce5ba898772ce45188284379/"
update_flag = "/?force_update=true"
ids = [ i for i in range(2604, 2633)]
for i in ids:
@dievardump
dievardump / README.md
Last active January 25, 2023 14:55
Base file I used to use for my mainnet contracts to be compatible with OpenSea

Warning !!!

Recent events have shown that the auto-approval for user proxies is way too dangerous.

Security of users' NFTs should come before the convenience of auto approving collection for trading.

This is why I decided to remove the files in this gist.

Security risk

@dmdboi
dmdboi / discord-webhook.js
Last active October 8, 2023 11:09
An example gist to send Embed messages via Discord Webhooks
const axios = require("axios")
//An array of Discord Embeds.
let embeds = [
{
title: "Discord Webhook Example",
color: 5174599,
footer: {
text: `📅 ${date}`,
},
@bozzin
bozzin / index.html
Created February 24, 2021 02:54
Interactive particles text create with three.js
<script type="x-shader/x-vertex" id="vertexshader">
attribute float size;
attribute vec3 customColor;
varying vec3 vColor;
void main() {
vColor = customColor;
vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );
@bradtraversy
bradtraversy / devcamper_specs.md
Last active May 14, 2024 14:45
Specs for Devcamper Udemy course project

DevCamper Backend API Specifications

Create the backend for a bootcamp directory website. The frontend/UI will be created by another team (future course). The html/css template has been created and can be used as a reference for functionality. All of the functionality below needs to be fully implmented in this project.

Bootcamps

  • List all bootcamps in the database
    • Pagination
    • Select specific fields in result
    • Limit number of results
  • Filter by fields
/*
Requires to have eslint and eslint-plugin vue installed locally.
(npm i -g eslint eslint-plugin-vue)
https://vuejs.github.io/eslint-plugin-vue/rules/
Put this in a ".eslintrc.json" at the root of the repository.
You can also put in in your $HOME.
*/
@stidges
stidges / tailwind.itermcolors
Last active November 30, 2023 21:00
An iTerm2 color scheme based on the Tailwind CSS color scheme (https://tailwindcss.com/docs/colors)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.17254902422428131</real>