Skip to content

Instantly share code, notes, and snippets.

@fukaoi
fukaoi / fetchTokenURI.js
Created April 20, 2021 04:10
fetch token url from smart contract at NFT toreka (NTX)
const Web3 = require('web3');
const web3 = new Web3('https://mainnet.infura.io/v3/1835809e0e6a4de38eaf1f7afb51e0ec');
const contractAddress = '0x34047D5d7F4C906998e0d9Def0d2Dc3B523d8398';
const abi = [
{
"constant": true,
"inputs": [
{
@mordr
mordr / note.md
Last active May 17, 2024 02:44
Set Visual Studio Code as default editor for kubectl

Set KUBE_EDITOR to Visual Studio Code, assumes 'code' is in PATH

export KUBE_EDITOR='code --wait'

Running k edit ... will open up the yaml using Visual Studio Code.

@ghostbear
ghostbear / Spotify - How to reduce and limit the cache size (Windows - Mac).md
Last active May 12, 2024 23:04
[Spotify] How to limit the cache size (Windows/Mac OS)

Credit to MadHatter

WINDOWS

Use your text editor of choice or if you don't have one use Windows Notepad
Opening with Notepad may or may not result in a fancy mess

  1. Close Spotify
  2. Open File Explorer and paste the following into the address bar %appdata%/Spotify¤
  3. Open the file named prefs with your text editor
  4. Change the numeric value following storage.size= . If storage.size= doesn't exist add it manually to the end of the file and assign numeric value. This value represents megabytes. One gigabyte equals 1024 megabytes. In the end, it should look something like this storage.size=1024
  5. Save the file
@zz85
zz85 / mesh_simplify.html
Last active November 7, 2023 02:10
Fast Quadric Mesh Simplification JS port
<!DOCTYPE html>
<html lang="en">
<head>
<title>three.js webgl - modifier - Fast Quadric Mesh Simplification</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
font-family: Monospace;
background-color: #f0f0f0;
@sekati
sekati / xcode-build-bump.sh
Created July 24, 2012 20:44
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
BEGIN;
CREATE EXTENSION IF NOT EXISTS LTREE;
/*==============================================================================
Define the tables.
==============================================================================*/
CREATE TABLE nodes
(