Skip to content

Instantly share code, notes, and snippets.

View heathdrobertson's full-sized avatar
🏠
FIRE TAC 1

Heath Robertson heathdrobertson

🏠
FIRE TAC 1
View GitHub Profile
@heathdrobertson
heathdrobertson / build.nix
Created December 3, 2019 18:02
Building an Ethereum Dapp development container with Nix Shell.
with import <nixpkgs> {};
# with pkgs;
stdenv.mkDerivation {
name = "dapp_monkey";
buildInputs = [python37 nodejs];
shellHook = ''
npm install body-parser express morgan nodemon web3
with import <nixpkgs> {};
# with pkgs;
stdenv.mkDerivation {
name = "ipfsenv";
buildInputs = [ipfs];
shellHook = ''
ipfs init
@heathdrobertson
heathdrobertson / 01_nixos_vim_container.md
Last active January 18, 2025 07:46
Setup Neovim using a NixOS Docker container.

Neovim IDE

Neovim IDE in a NixOS Docker Container

docker run --volumes-from=nix -it \
    -v $(pwd):/home \
    -w /home \
    --name <change-me> \
    -p 9005:9005 \
 -p 3000:3000 \
@heathdrobertson
heathdrobertson / SampleContract.sol
Last active May 26, 2020 16:15
Basic Solidity Contract Layout
pragma solidity >=0.4.21 <0.7.0;
// It's important to avoid vulnerabilities due to numeric overflow bugs
// OpenZeppelin's SafeMath library, when used correctly, protects agains such bugs
// More info: https://www.nccgroup.trust/us/about-us/newsroom-and-events/blog/2018/\
// november/smart-contract-insecurity-bad-arithmetic/
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@Openzeppelin/contracts/access/Ownable.sol";
@heathdrobertson
heathdrobertson / Main.hs
Last active October 30, 2020 12:05
first_contract
{-# LANGUAGE OverloadedStrings #-}
module Example where
import Language.Marlowe
main :: IO ()
main = print . pretty $ contract
{- Define a contract, Close is the simplest contract which just ends the contract straight away