Skip to content

Instantly share code, notes, and snippets.

View Yenniferh's full-sized avatar
:octocat:
Learning something

Yennifer Herrera Yenniferh

:octocat:
Learning something
View GitHub Profile
@Yenniferh
Yenniferh / promises-no-callback-hell-day-11.js
Last active March 26, 2023 18:27
Avoid the callback hell by using promises
import { doTask1, doTask2, doTask3 } from './tasks';
export function runCode() {
return Promise.all([doTask1(), doTask2(), doTask3()])
}
@Yenniferh
Yenniferh / .deps...npm...@openzeppelin...contracts...access...AccessControl.sol
Last active March 15, 2022 23:11
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";
/**
@Yenniferh
Yenniferh / weather.json
Created March 9, 2020 02:44
Json response
{
"cod": "200",
"message": 0,
"cnt": 40,
"list": [
{
"dt": 1583690400,
"main": {
"temp": 301.93,
"feels_like": 298.64,
private void generateNullable(Node node) {
if (node == null) {
return;
}
if (!(node instanceof LeafNode)) {
Node left = node.getLeft();
Node right = node.getRight();
generateNullable(left);
generateNullable(right);
switch (node.getSymbol()) {