Skip to content

Instantly share code, notes, and snippets.

View ivanmolto's full-sized avatar
💚
regen

Ivan Molto ivanmolto

💚
regen
View GitHub Profile
@ivanmolto
ivanmolto / nvmCommands.js
Created January 29, 2024 21:35 — forked from chranderson/nvmCommands.js
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
{
'background': {
'plain': .2,
'planet': .15,
'falcon_heavy': .1,
'space_shuttle': .05,
'blue': .25,
'red': .25,
},
'suit': {
@ivanmolto
ivanmolto / .env
Created June 11, 2021 21:42 — forked from djirdehh/.env
Sample .env file (without values) for client project after lesson 12.1 of Part II of the TinyHouse Fullstack React Masterclass.
PORT=
PUBLIC_URL=
DB_USER=
DB_USER_PASSWORD=
DB_CLUSTER=
G_CLIENT_ID=
G_CLIENT_SECRET=
SECRET=
NODE_ENV=
G_GEOCODE_KEY=
@ivanmolto
ivanmolto / users.ts
Created June 11, 2021 20:34 — forked from djirdehh/users.ts
Mock users data used in lesson 3.3 of the TinyHouse Masterclass - Part II
const users: User[] = [
{
_id: "5d378db94e84753160e08b55",
token: "token_************",
name: "James J.",
avatar:
"https://res.cloudinary.com/tiny-house/image/upload/w_1000,ar_1:1,c_fill,g_auto/v1560648533/mock/users/user-profile-1_mawp12.jpg",
contact: "james@tinyhouse.com",
walletId: "acct_************",
income: 723796,
@ivanmolto
ivanmolto / listings.ts
Created June 11, 2021 20:34 — forked from djirdehh/listings.ts
Mock listings data used in lesson 3.3 of the TinyHouse Masterclass - Part II
const listings: Listing[] = [
{
_id: new ObjectId("5d378db94e84753160e08b30"),
title: "Clean and fully furnished apartment. 5 min away from CN Tower",
description:
"2 bed, 2 bathroom cozy apartment in the heart of downtown Toronto and only 5 min away from the CN Tower, Scotiabank Arena, and Rogers Center.",
image:
"https://res.cloudinary.com/tiny-house/image/upload/v1560641352/mock/Toronto/toronto-listing-1_exv0tf.jpg",
host: "5d378db94e84753160e08b57",
type: ListingType.Apartment,
@ivanmolto
ivanmolto / CTHelpers.sol
Created May 26, 2021 11:13 — forked from cag/CTHelpers.sol
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.6.6+commit.6c089d02.js&optimize=false&gist=
pragma solidity ^0.6.0;
import { IERC20 } from "github.com/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
library CTHelpers {
/// @dev Constructs a condition ID from an oracle, a question ID, and the outcome slot count for the question.
/// @param oracle The account assigned to report the result for the prepared condition.
/// @param questionId An identifier for the question to be answered by the oracle.
/// @param outcomeSlotCount The number of outcome slots which should be used for this condition. Must not exceed 256.
function getConditionId(address oracle, bytes32 questionId, uint outcomeSlotCount) internal pure returns (bytes32) {
@ivanmolto
ivanmolto / less.md
Created May 15, 2021 10:01 — forked from nnja/less.md
A cheatsheet for using less on the command line

Tips for using less on the command line.

To navigate:

  • f = for next page
  • b = for previous page

To search:

  • /<query>
import {
Avalanche,
BinTools,
BN,
Buffer
} from "../../src";
import {
AVMAPI,
KeyChain as AVMKeyChain,
SECPTransferOutput,
import {
Avalanche,
BinTools,
BN,
Buffer
} from "../../src";
import {
AVMAPI,
KeyChain as AVMKeyChain,
SECPTransferOutput,
import {
Avalanche,
BinTools,
BN,
Buffer
} from "../../src";
import {
AVMAPI,
KeyChain,
UTXOSet,