Skip to content

Instantly share code, notes, and snippets.

Avatar

Simon Vans-Colina simonvc

View GitHub Profile
@simonvc
simonvc / nftree.treedao.eth
Created Apr 24, 2021
nftree drop 1 contract on mainnet
View nftree.treedao.eth
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 Apr 23, 2021
Signing and verifying a message to enable single sign-on using web3py, but where the message was created by web3js 2021
View signing_and_verifying_using_web3py.py
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.
View gist:db01c00b6bed838cf9f01be23665b1f8
0xa47d20159c503727dFA933E6f1229f09b1f3eef9
@simonvc
simonvc / TreeDAONFTree.sol
Created Apr 13, 2021
TreeDAO NFT Contract
View TreeDAONFTree.sol
// 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 Nov 9, 2020
December 2020 Fronted Python Fullstack role.
View 4.month.full.stack.md

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

View election2020.py
import requests
from pyfiglet import Figlet
# {"0x44ea84a85616f8e9cd719fc843de31d852ad7240":{"usd":0.628788}}
import requests
r = requests.get(
url="https://api.coingecko.com/api/v3/simple/token_price/ethereum?contract_addresses=0x44ea84a85616f8e9cd719fc843de31d852ad7240&vs_currencies=USD"
)
@simonvc
simonvc / Dockerfile
Created Apr 3, 2017
Dockerfile for magnetico
View Dockerfile
FROM ubuntu:16.10
RUN apt-get update
RUN apt-get -y install python3.5 python3-pip
RUN apt-get -y install supervisor
RUN pip3 install --upgrade pip
RUN pip3 install magneticod magneticow
RUN mkdir -p /var/log/supervisor
RUN echo [supervisord] > /etc/supervisor/conf.d/supervisord.conf
RUN echo nodaemon=true >> /etc/supervisor/conf.d/supervisord.conf
@simonvc
simonvc / drone.md
Created Mar 24, 2017
Drone buying guide Spring 2017
View drone.md

Ok, Here's my March 2017 drone buying guide...

First decide what you want to do with a drone. The decide how much time you're prepared to put into building one, and finally decide how much money you want to spend.

Drones can do a lot of different things these days, but the most popular (in order of popularity) are.

1/ Aerial Photography 70%

2/ FPV Racing 20%

View gist:accafbba4b922d30b1246d8c282db3a8
cd ~/Library/Containers/com.docker.docker/Data/database/
git reset --hard
cat com.docker.driver.amd64-linux/slirp/max-connections
echo 1500 > com.docker.driver.amd64-linux/slirp/max-connections
git add com.docker.driver.amd64-linux/slirp/max-connections
git commit -s -m 'Update the maximum number of connections'
View gist:82b7f215daf4d947b03fdd091af4cb94
0xF0bb9686Aa3bb1694695dfd36764b8e1d02F7E36 There once was a man named simon.