Skip to content

Instantly share code, notes, and snippets.

View bajcmartinez's full-sized avatar

Juan Cruz Martinez bajcmartinez

View GitHub Profile
@bajcmartinez
bajcmartinez / erc20-token-sample.sol
Last active December 17, 2024 07:15
Necessary code to generate an ERC20 Token
pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
// Sample token contract
//
// Symbol : LCST
// Name : LCS Token
// Total supply : 100000
// Decimals : 2
// Owner Account : 0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe
@bajcmartinez
bajcmartinez / smart_contract.sol
Last active January 5, 2023 19:16
Access a Smart Contract from your web application
pragma solidity ^0.6.6;
contract CoolNumberContract {
uint public coolNumber = 10;
function setCoolNumber(uint _coolNumber) public {
coolNumber = _coolNumber;
}
}
@bajcmartinez
bajcmartinez / app.py
Last active January 6, 2024 06:21
Build Secure APIs with Flask and Auth0
import json
from six.moves.urllib.request import urlopen
from functools import wraps
from flask import Flask, request, jsonify, _request_ctx_stack
from flask_cors import cross_origin
from jose import jwt
AUTH0_DOMAIN = 'AUTH0-DOMAIN'
API_IDENTIFIER = 'API-IDENTIFIER'
@bajcmartinez
bajcmartinez / app.py
Created October 12, 2021 08:19
Object tracking with python
import cv2
import sys
(major_ver, minor_ver, subminor_ver) = (cv2.__version__).split('.')
if __name__ == '__main__' :
# Set up tracker.
# Instead of CSRT, you can also use
// Return a list of `params` to populate the [slug] dynamic segment
export async function generateStaticParams() {
return ['team1', 'team2'].map((team) => ({
teamId: team,
}))
}
type Props = {
params: {
teamId: string