Skip to content

Instantly share code, notes, and snippets.

const puppeteer = require('puppeteer');
const fs = require('fs');
const width = 4000;
const height = 4000;
const num = 1000;
const collectionName = "Hyperion";
const license = "CC BY-NC-ND 4.0"//or something else
const windowTraitsKey = '$traits' // in your application,
const description = `<You NFT description here>`
// LICENCE MIT
const path = require('path');
const fs = require('fs');
const util = require("util");
// Usage: node analyze-metadata.js <metadata directory> [<output file>]
//
// Calculates the percent of all NFTs that share a given trait in decimal form.
// Also ranks each nft by summing inverse of trait frequency.
// Output format is json:
@abigpotostew
abigpotostew / index.js
Last active November 16, 2021 18:39
Gradis to GIF script
/**
* Gradis Token to GIF
* Install:
* * npm i puppeteer gifencoder png-js
* Run:
* * node index.js 102402010402011602011606
* * node index.js 10360308020202100302110304,10350503030202000202140003,10160116030200020302040506
* tested on node v14.17.6
* For best results close all other apps and do not use your computer while this script loads.
* Make sure you have a couple GB of free memory and no other CPU intensive processes running.
@abigpotostew
abigpotostew / .deps...npm...@openzeppelin...contracts...interfaces...IERC165.sol
Created October 18, 2021 23:33
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/introspection/IERC165.sol";
@abigpotostew
abigpotostew / Base64.kt
Created January 15, 2018 03:58
Base64 cross browser friendly encode and decoding.
/**
* Base64 encode and decode, cross browser friendly.
*
* For Kotlin JS target.
*
* From: http://jsfiddle.net/gabrieleromanato/qAGHT/
*/
class Base64 private constructor() {
companion object {
const val KEY_STR = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
@abigpotostew
abigpotostew / opal_api.lua
Created April 1, 2016 05:39
Opal API for zbstudio
local api = {
oEvent = {
type = "class",
description="is this thing on?",
childs = {
DispatchEvent = {
description = "Notify all listeners for event_name, calling respective events.",
args = "(Corona Display Object, Event Name, Event Table)",
returns = "(nil)",
},
@abigpotostew
abigpotostew / mischiefmakers_1
Created May 19, 2015 00:16
mischief makers code walkthrough 1
int frames = 80;
boolean save_frames = true;
color[] colors = {color(202,170,221), color(26,20,20)};
void setup(){
size(500,500);
smooth(8);
}
@abigpotostew
abigpotostew / gist:f893f7fe79881fdfc537
Created February 27, 2015 04:20
ofxCairo.h failure on RPi 1 (arm6)
pi@raspberrypi ~/openFrameworks/apps/myApps/luaExample $ make
armv6l
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-2.0 libmpg123
Compiling OF library for Release
make[1]: Entering directory '/home/pi/openFrameworks/libs/openFrameworksCompiled/project'
armv6l
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-2.0 libmpg123
armv6l
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk+-2.0 libmpg123
make[2]: Nothing to be done for 'ReleaseABI'.