Skip to content

Instantly share code, notes, and snippets.

View simonvc's full-sized avatar
💭
Hiring Go Engineers

Simon Vans-Colina simonvc

💭
Hiring Go Engineers
View GitHub Profile
@simonvc
simonvc / gpt4_service_creator.py
Created April 13, 2023 03:58
This python script will use GPT-4 API to create a encore.dev microservice that may or may not work
import openai
import os
from halo import Halo
# Get the openai token from the OPENAI_TOKEN env variable and store it in openai_token
openai.api_key = os.environ.get('OPENAI_TOKEN')
system_prompt="""You are an expert golang microservice engineer. You will be given a description of a microservice to create and your output should be something we can pipe into bash such that it creates all the files required.
For example, if you wanted to create a directory and two files you would output:
mkdir user-service;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@chainlink/contracts/src/v0.8/ChainlinkClient.sol";
contract APIConsumer is ChainlinkClient {
using Chainlink for Chainlink.Request;
@simonvc
simonvc / NFTree.sol
Created February 4, 2022 14:52
TreeDAO NFTree contract
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol";
interface TreeToken {
function burnFrom(address, uint) external;
// contracts/GLDToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.3;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol";
contract TreeToken is ERC20PresetMinterPauser {
constructor() ERC20PresetMinterPauser("TreeDAO Tree Token", "Trees") {
_mint(0xE0743ac9a31C40f3808908708a7a0a0CFC308c2e, 3500000000000000400);
@simonvc
simonvc / bag.md
Last active May 27, 2021 14:47
May-June 2021 Crypto Bag

My Bag 2021 May/June After the 55% bitcoin correction.

Not Investment Advice

  • This is my strategy and my holdings, not advice.
  • This is my life strategy: "Never sell all. Only sell 50% when it's life changing money."
  • My day to day strategy is, 90% cold storage, 10% on an exchange (FTX) so i can buy the dips.
  • I no-longer trade derivatives or use leverage.

Cold Storage - Diamond Hands - Moon Bag

@simonvc
simonvc / nftree.treedao.eth
Created April 24, 2021 13:01
nftree drop 1 contract on mainnet
0x8Fa34344a3D1F12cF077bFF904604A8979E87041
Metadata of "nftree" was published successfully.
contracts/5_NFTree.sol :
dweb:/ipfs/QmYWXha5P4iWHXUwjsZgeHpitbvjJBLaHvFBVT63CkojjX
https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/access/AccessControl.sol :
@simonvc
simonvc / signing_and_verifying_using_web3py.py
Created April 23, 2021 22:22
Signing and verifying a message to enable single sign-on using web3py, but where the message was created by web3js 2021
from web3 import Web3
import web3
from random import randrange
from eth_account.messages import encode_defunct
# This is a server module. It runs on the Anvil server,
# rather than in the user's browser.
#
# To allow anvil.server.call() to call functions here, we mark
# them with @anvil.server.callable.
0xa47d20159c503727dFA933E6f1229f09b1f3eef9
@simonvc
simonvc / TreeDAONFTree.sol
Created April 13, 2021 13:18
TreeDAO NFT Contract
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol";
interface TreeToken {
function burnFrom(address, uint) external;
@simonvc
simonvc / 4.month.full.stack.md
Last active November 9, 2020 14:40
December 2020 Fronted Python Fullstack role.

Fronted is hiring a Python/Django + NextJS fullstack engineer for 4 months (parental leave cover)

  • At Fronted our mission is to make renting less stressful, starting by giving renters another option for how to pay their rental security deposit. Our research tells us that there's millions of people trapped in sub-optimal living conditions, who'd move into places of their own, if they had the cash to front a rental deposit.

  • We're at the beginning of our journey, launching before the end of the year as part of the FCA Sandbox https://www.fca.org.uk/firms/regulatory-sandbox/regulatory-sandbox-cohort-6

  • Small team (3-4 engineers including CTO and CPO). Team is Ex-Monzo, Apple, Bud, Zego https://techcrunch.com/2020/08/27/passion-capital-has-backed-fronted/

  • Remote, London Timezone +- 3hrs ok but must be tax resident in the UK