Skip to content

Instantly share code, notes, and snippets.

View timpulver's full-sized avatar

Tim Pulver timpulver

View GitHub Profile

verify ownership on-chain

Verify an OBJKT ID was issued by an address, by querying the on-chain data directly:

  1. Take objkt ID, such as 72424 here: https://www.hicetnunc.xyz/objkt/72424
  2. Place that into https://api.tzstats.com/explorer/bigmap/522/{id} such as: https://api.tzstats.com/explorer/bigmap/522/72424
  3. Look at the "issuer" field and ensure the address matches exactly the profile you are trying to buy from.

e.g. My address is tz1XHADaUcMSkTN9gdmtRqcnrrZfs4tNkCPg and it matches, so we can verify that OBJKT has been minted by me.

@mattdesl
mattdesl / pinning.md
Last active January 28, 2023 19:56
hicetnunc IPFS pinning

Hicetnunc.xyz IPFS Pinning

💡 These steps will become easier, less technical, and more accessible as more open tools begin to emerge around Hicetnunc pinning. The steps below assume macOS but should work similarly across other platforms. This gist can be seen as a working draft toward more polished documentation; if you see any issues please post a comment below.

Basic Idea

Hicetnunc.xyz aims to be "decentralized" which means the OBJKTs are owned by the users, not the platform. So, in theory, if hicetnunc disappears, another marketplace could emerge on the same (user-owned) assets. But, this paradigm of decentralization means that you own the assets; so the responsibility to maintain them lies on the users, not the platform.

Of course, hicetnunc and some of its users will probably also make an effort to help maintain all the assets on its platform; but you should not rely purely on that, as it goes against the core ethos of dec

#!/bin/sh
# ------------------------------------------------------------------------------
# Uses ImageMagick to create an animated GIF from an image sequence and by using
# a common palette.
# Note: Providing a palette speeds up the encoding but can be disabled
# by removing the “remap” option.
# The resulting GIF is passed to “ImageOptim” for filesize reduction.
# Note: could eventually be replaced with Gifsicle or left out entirely.
#
# ------------------------------------------------------------------------------
#!/bin/sh
# ------------------------------------------------------------------------------
# Uses FFmpeg to create an H.264 encoded MPEG-4 movie at 30 fps from
# an image sequence; filesize/quality can be tuned with the second parameter.
#
# ------------------------------------------------------------------------------
# Usage:
# > sh makemovie.sh imageFolder 20
# - imageFolder is a folder containing the images
# - 20 is an optional constant rate factor value,
@mattdesl
mattdesl / palette-btoa.js
Last active December 14, 2023 21:49
palette compression
// Polyfill so we can run this in Node.js as well
if (typeof atob !== 'function') {
var atob = a => Buffer.from(a, 'base64').toString('binary')
var btoa = b => Buffer.from(b).toString('base64');
}
// 511 bytes after minify
var a=[
["#1b6f3f", "#10c5b4", "#ade4cd", "#29ec19"],
["#96bde8", "#246a85", "#3483e4", "#b168f6"],
@mikhailov-work
mikhailov-work / turbo_colormap.py
Created August 8, 2019 23:31
Turbo Colormap Look-up Table
# Copyright 2019 Google LLC.
# SPDX-License-Identifier: Apache-2.0
# Author: Anton Mikhailov
turbo_colormap_data = [[0.18995,0.07176,0.23217],[0.19483,0.08339,0.26149],[0.19956,0.09498,0.29024],[0.20415,0.10652,0.31844],[0.20860,0.11802,0.34607],[0.21291,0.12947,0.37314],[0.21708,0.14087,0.39964],[0.22111,0.15223,0.42558],[0.22500,0.16354,0.45096],[0.22875,0.17481,0.47578],[0.23236,0.18603,0.50004],[0.23582,0.19720,0.52373],[0.23915,0.20833,0.54686],[0.24234,0.21941,0.56942],[0.24539,0.23044,0.59142],[0.24830,0.24143,0.61286],[0.25107,0.25237,0.63374],[0.25369,0.26327,0.65406],[0.25618,0.27412,0.67381],[0.25853,0.28492,0.69300],[0.26074,0.29568,0.71162],[0.26280,0.30639,0.72968],[0.26473,0.31706,0.74718],[0.26652,0.32768,0.76412],[0.26816,0.33825,0.78050],[0.26967,0.34878,0.79631],[0.27103,0.35926,0.81156],[0.27226,0.36970,0.82624],[0.27334,0.38008,0.84037],[0.27429,0.39043,0.85393],[0.27509,0.40072,0.86692],[0.27576,0.41097,0.87936],[0.27628,0.42118,0.89123],[0.27667,0.43134,0.90254],[0.27691,0.44145,0.913
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active June 2, 2024 11:24
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@agrinman
agrinman / magic_link_login.go
Last active May 2, 2024 10:31
A quick Golang code sample for using ApproveAPI to send a magic login link.
@SamL98
SamL98 / get_recents.py
Last active May 15, 2024 18:18
Python Script for Getting Spotify Listening History
# To run as a local cron job, edit your crontab like so:
#
# SPOTIPY_USER_ID=<redacted>
# SPOTIPY_CLIENT_ID=<redacted>
# SPOTIPY_CLIENT_SECRET=<redacted>
# script_path=<redacted>
# SPPATH=$script_path
# python_path=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3
#
# PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
@baketzforme
baketzforme / TezosVanity.md
Last active November 10, 2023 19:28
Tezos Vanity Address with Seed Phrase

WARNING: Vanity addresses generated with this tool may not be widely supported in various wallets anymore. They may consider the addresses generated with this tool to be "legacy" wallets. Therefore I no longer recommended generating vanity addresses using this method.

After seeing the recently posted How To Generate A Tezos Vanity Address, I thought I'd share a method I've used to generate a vanity address that has the benefit of being able to easily be restored or transferred to another wallet from a seed phrase backup.

Most of the credit goes to Stephen Andrews. I've just slightly modified some of the code he wrote to get it to work the way I want.

Everything below assumes you are working from the Linux command line (tested in Debian/Ubuntu distributions):

First, clone Stephen Andrews' eztz repository from github: