Skip to content

Instantly share code, notes, and snippets.

@nicovalencia
nicovalencia / indie-metrics-analysis.prompt
Last active June 9, 2023 19:01
Indie Metrics Analysis Prompt
Given this CSV of goal metrics, please analyze progress according to the requirements below:
```
Committee,Goal Name,Goal Target,June 9th,June 16,June 23,June 30,July 7,July 14,July 21,July 28,August 4,August 11,August 18,August 25,September 1,September 8,September 15,September 22,September 29,October 6,October 13,October 20,October 27,November 3,November 10,November 17,November 24,December 1,December 8,December 15,December 22,December 29
Strategy / Partnerships,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,Revenue (per season),"$500,000","$10,000",,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Product,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,Tasks (per season),25,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,% Indies Completed Tasks,35%,10%,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Growth,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
@nicovalencia
nicovalencia / countdown.js
Last active February 7, 2022 21:04
React Countdown
const [countdown, setCountdown] = useState('xx:xx')
function updateCountdown() {
const totalSeconds = (TARGET_TIMESTAMP - new Date().getTime()) / 1000
const minutes = Math.floor(totalSeconds / 60)
const seconds = Math.round(totalSeconds % 60)
const countdown = `${minutes}:${seconds > 9 ? seconds : '0' + seconds}`
if (totalSeconds > 1) {
setCountdown(countdown)
setTimeout(updateCountdown, 1000)

Polygon <> ETH NFT

Polygon Documentation

Polygon's getting started flows outline how to create a Polygon contract that allows for bridging tokens (ERC-20/721/1155) FROM Ethereum TO Polygon. Typically, what we really want is to create a token that's mintable on Polygon first, then allows the owner to bridge the token to Ethereum. This is called the Mintable Assets flow, and is what we will outline below. Read more about the high level documentation here: https://docs.polygon.technology/docs/develop/ethereum-polygon/mintable-assets

Simple Explanation

With the Polygon Mintable (or "Mintable Assets") flow, tokens are minted the Polygon contract first.

Overview

Now that the IndieDAO community has officially launched its governance token and initial project efforts, it’s time to design a transparent system for awarding $INDIE tokens to contributors according to the value they provide to the DAO.

History

Upon DAO launch in October 2021, we bootstrapped the initial token grant of 1M $INDIE (out of a 10M max supply cap), issuing tokens to each member according to the following parameters:

  • 1 point per hour contributed to past projects
@nicovalencia
nicovalencia / config.json
Created October 15, 2021 20:39
Level Protocol - IndieDAO Metadata Example
{
"name": "Katy Jeremko",
"country": "United States",
"projects": [
"Client Project 1",
"Client Project 2",
"Client Project 3"
],
"sourceCredBySeason": [{
"1": 2298,
@nicovalencia
nicovalencia / LevelProtocolERC721Metadata.json
Created September 23, 2021 21:22
Level Protocol $LEVEL ERC-721 Token Metadata Example
{
"name": "Nico Valencia",
"description": "Developer, designer, and co-founder of 2C, IndieDAO, Level Protocol.",
"image": "ipfs://QmPK1s...gpqB",
"daos": {
"0": "ipfs://Qm4Xos...dHUt",
"7": "ipfs://QmYgpq...3pNY",
"13": "ipfs://QmUgJT...pohQ"
}
}
{"offers":[{"id":"145","price":0.2,"rarity":4266,"value":18670,"link":" https://opensea.io/assets/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7/145 "},{"id":"7750","price":0.5,"rarity":172,"value":15656,"link":" https://opensea.io/assets/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7/7750 "},{"id":"1496","price":0.5,"rarity":2927,"value":10146,"link":" https://opensea.io/assets/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7/1496 "},{"id":"4776","price":1,"rarity":398,"value":7602,"link":" https://opensea.io/assets/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7/4776 "},{"id":"1871","price":2.35,"rarity":384,"value":3240.851063829787,"link":" https://opensea.io/assets/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7/1871 "},{"id":"6682","price":0.5,"rarity":6764,"value":2472,"link":" https://opensea.io/assets/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7/6682 "},{"id":"5236","price":0.78,"rarity":6221,"value":2280.7692307692305,"link":" https://opensea.io/assets/0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7/5236 "},{"id":"3972","price":5
@nicovalencia
nicovalencia / FluidWidthResponsiveImage.js
Last active April 2, 2021 19:16
Fluid Width Responsive Next.js Image
import PropTypes from 'prop-types'
import styled from 'styled-components'
import ResponsiveImage from './ResponsiveImage'
import theme from '../../util/theme'
const MaskContainer = styled.div`
overflow: hidden;
display: flex;
justify-content: center;
@nicovalencia
nicovalencia / react-hooks-example.js
Last active March 4, 2019 20:25
React hooks todo example
import React, { useState, useContext } from 'react';
const DataContext = React.createContext();
const DataProvider = (props) => {
const [items, setItems] = useState([
"Thing 1",
"Thing 2",
"Thing 3",
@nicovalencia
nicovalencia / react-hoc-context-example.js
Created March 4, 2019 19:12
React HOC Context Example
import React from 'react';
const DataContext = React.createContext();
class DataProvider extends React.Component {
state = {
items: [
"Thing 1",
"Thing 2",
"Thing 3",