Skip to content

Instantly share code, notes, and snippets.

View strictlymomo's full-sized avatar

Momo Araki strictlymomo

View GitHub Profile
@maurelian
maurelian / console.sol
Last active February 25, 2022 18:44
A JS style console.log() function for solidity.
pragma solidity ^0.4.10;
// Update: Just use HardHat's: https://github.com/nomiclabs/hardhat/blob/master/packages/hardhat-core/console.sol
// Enables event logging of the format `console.log('descriptive string', variable)`,
// without having to worry about the variable type (as long as an event has been declared for that type in the
// Console contract.
contract Console {
event LogUint(string, uint);
@auremoser
auremoser / graph.md
Last active December 27, 2018 17:16
Parsons: Webgraphs
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@mbostock
mbostock / .block
Last active December 17, 2023 21:17
Save SVG as PNG
license: gpl-3.0