This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 2023-11-27 MIT LICENSE | |
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com. | |
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town. | |
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same! | |
Send me your ChatGPT text adventure game on X, I'd love to try it! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.9; | |
// Unlike the string type, ShortString is a value type that can be made immutable. | |
// It supports strings of at most 32 bytes and assumes they don't contain null bytes. | |
type ShortString is bytes32; | |
error StringTooLong(string s); |
The following instructions go step-by-step through how to create vesting call options, similar to equity options that startups typically use to incentivize employees.
H/t @Fubuloubu, who approached us about creating these for the Yearn team to potentially use! This allows Yearn or similar projects (on-chain DAOs) to grant vesting options to any contributor.
We'll use YFI call options as an example.
- Call
createOptionsContract
from the OptionFactory via Etherscan - To create a $0.50 YFI call option, parameters as follows:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################## | |
## Example 1 - play a note | |
play 60 | |
############################################## | |
## Example 2 - play 4 random notes | |
4.times do | |
play rrand_i(60, 90) | |
sleep 0.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
const CoinGecko = require("coingecko-api"); | |
const { table } = require("table"); | |
const chalk = require("chalk"); | |
const cg = new CoinGecko(); | |
const coins = [ | |
{ "id": "ethereum", "symbol": "ETH" }, | |
{ "id": "bitcoin", "symbol": "BTC" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sum = values.reduce(function(sum, value){ | |
return sum + value; | |
}, 0); | |
var avg = sum / data.length; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Date, blocknum, difficulty as of 2019-01-18 | |
# Script by vbuterin, slightly modified by lrettig | |
import random | |
import datetime | |
import sys | |
def calc_bomb(i): | |
period = i // 100000 | |
if (period > 0): | |
# Subtract 2, this is the original formula |
-
Find the Discord channel in which you would like to send commits and other updates
-
In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe!
NewerOlder