Skip to content

Instantly share code, notes, and snippets.

library RoundedDivMath {
/**
* @dev Division, round to nearest integer (AKA round-half-up)
* @param a What to divide
* @param b Divide by this number
*/
function roundedDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity automatically throws, but please emit reason
require(b > 0, "div by 0");
@Restuta
Restuta / framework-sizes.md
Last active April 19, 2025 05:14
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js