Skip to content

Instantly share code, notes, and snippets.

@pguso
pguso / gist:26f0707d02bd7fe63133f846cc276508
Created November 2, 2022 15:14
Elrond Crowdfunding Smart Contract
#![no_std]
elrond_wasm::imports!();
elrond_wasm::derive_imports!();
#[derive(TopEncode, TopDecode, TypeAbi, PartialEq, Eq, Clone, Copy, Debug)]
pub enum Status {
FundingPeriod,
Successful,
Failed,
@pguso
pguso / nft-market.sol
Last active February 28, 2023 19:02 — forked from dabit3/basicmarket.sol
Basic NFT Marketplace with Price Feed (MATIC to USD)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
contract NFT is ERC721URIStorage {
@pguso
pguso / setup-data-analysis-environment-with-typescript.md
Last active September 10, 2021 07:52
Setup Data Analysis Environment with Typescript and Plotly

Setup Data Analysis Environment with Typescript

Similar to Pandas & Jupyter Notebook in Python

In this tutorial we will set up an environment to make data analysis with typescript and write our code in an experimental environment like Jupyter Notebook.

The following part is copied from https://github.com/yunabe/tslab.

Installing tslab

@pguso
pguso / gist:e92a0769e5c1636eb8b3
Created February 2, 2016 11:30 — forked from davedevelopment/gist:2884984
Print routes and where they're defined for a silex app
#!/usr/bin/env php
<?php
# bin/routes
$app = require __DIR__ . '/../app/bootstrap.php';
$routes = $app['routes']->all();
foreach($routes as $route) {
$cr = new ReflectionFunction($route->getDefault('_controller'));