How to break up a monorepo using git subtree:
- Set up some basic stuff:
- These should be independent, not nested
$ NEW_REPO_PATH=
$ OLD_REPO_PATH=
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
# Copyright 2024 Google LLC. | |
# SPDX-License-Identifier: Apache-2.0 | |
{ | |
description = "Demo of generating a YAML file as a flake output"; | |
outputs = { self, nixpkgs }: let | |
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed; | |
in { | |
packages = forAllSystems (system: | |
let pkgs = nixpkgs.legacyPackages.${system}; | |
in { |
How to break up a monorepo using git subtree:
$ NEW_REPO_PATH=
$ OLD_REPO_PATH=
Using newer compiler versions and the optimizer gives gas optimizations and additional safety checks for free!
The advantages of versions 0.8.*
over <0.8.0
are:
0.8.0
(can be more gas efficient than some
library based safemath).0.8.2
, leads to cheaper runtime gas.
Especially relevant when the contract has small functions. ForMain URL: fip.fr
Wikipedia: en.wikipedia.org/wiki/FIP_(radio_station)
Mobile apps: Android / iOS
Direct streams for your listening pleasure
//SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
contract Token { | |
address public owner; | |
uint256 public totalSupply; | |
mapping (address => uint256) public balanceOf; | |
mapping (address => mapping (address => uint256)) public allowance; | |
string public symbol = "TOKEN"; | |
uint256 public decimals = 18; |
from instagram_private_api import Client, ClientCompatPatch | |
from instagram_private_api.errors import ClientError | |
username = "" | |
password = "" | |
api = Client(username, password) # have to disable 2fa | |
posts = [] | |
user_feed = api.user_feed(api.authenticated_user_id, max_id="") | |
posts.extend(user_feed['items']) |
I recently stumbled upon Falsehoods programmers believe about time zones, which got a good laugh out of me. It reminded me of other great lists of falsehoods, such as about names or time, and made me look for an equivalent for Ethereum. Having found none, here is my humble contribution to this set.
estimateGas
will return the gas required by my transactionCalling estimateGas
will return the gas that your transaction would require if it were mined now. The current state of the chain may be very different to the state in which your tx will get mined. So when your tx i
with import <nixpkgs> {}; | |
let | |
my-python-packages = python-packages: with python-packages; [ | |
pip | |
setuptools | |
]; | |
python-with-my-packages = pkgs.python3.withPackages my-python-packages; | |
# define packages to install with special handling for OSX |