Skip to content

Instantly share code, notes, and snippets.

@teddav
teddav / AngleExplainsYul.sol
Last active March 17, 2023 14:53
Tutorial for writing a basic contract in Yul (assembly). See https://blog.angle.money/playing-with-yul-cd4785e456d8
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.15;
contract AngleExplains {
uint private secretNumber;
mapping(address => uint) public guesses;
bytes32 public secretWord;
@teddav
teddav / better-nodejs-require-paths.md
Created August 3, 2018 14:18 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions