Main Ingredients
Name | Quantity | |
---|---|---|
Yukon Gold Potatoes | 2.5 lbs. | |
Leeks | 2 large |
// evm.ts | |
// —— Helpers ——————————————————————————————————————————————— | |
type U256 = bigint; | |
// bytes → bigint via hex string | |
function fromBytes(bytes: Uint8Array): U256 { | |
const hex = [...bytes].map(b => b.toString(16).padStart(2, '0')).join(''); | |
return BigInt('0x' + hex); |
// 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']) |