Skip to content

Instantly share code, notes, and snippets.

View rafaelescrich's full-sized avatar

Rafael Escrich rafaelescrich

View GitHub Profile
@rafaelescrich
rafaelescrich / cuda_install.md
Created November 17, 2023 03:00 — forked from denguir/cuda_install.md
Installation procedure for CUDA & cuDNN

How to install CUDA & cuDNN on Ubuntu 22.04

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation

@rafaelescrich
rafaelescrich / send_bundle.rs
Created November 16, 2023 18:33
Rust flashbots
use flashbots_rs::{
client::FlashbotsClient,
types::{Bundle, Transaction},
};
fn main() {
// Establish a connection to the Flashbots RPC endpoint
let client = FlashbotsClient::new("https://rpc.flashbots.net");
// Create a transaction object with the necessary details
package main
import (
"fmt"
"github.com/ethereum/go-ethereum/crypto"
hdwallet "github.com/rafaelescrich/go-ethereum-hdwallet"
)
func main() {
@rafaelescrich
rafaelescrich / main.go
Created April 17, 2023 00:26
ZKP example in Golang
package main
import (
"crypto/elliptic"
"crypto/rand"
"fmt"
"math/big"
)
type Prover struct {
import React, {useState, useEffect} from 'react';
let Web3 = require('web3');
function Index() {
const [web3, setWeb3] = useState(null)
const [address, setAddress] = useState(null)
const [contract, setContract] = useState(null)
const [totalSupply, setTotalSupply] = useState(0)
@rafaelescrich
rafaelescrich / safe_sig_gen_uport_eip712.ts
Created June 10, 2022 14:18 — forked from rmeissner/safe_sig_gen_uport_eip712.ts
Example Safe signature generation with uport eip712 lib
import EIP712Domain from "eth-typed-data";
import BigNumber from "bignumber.js";
import * as ethUtil from 'ethereumjs-util';
import { ethers } from "ethers";
import axios from "axios";
/*
* Safe relay service example
* * * * * * * * * * * * * * * * * * * */
@rafaelescrich
rafaelescrich / main.go
Created March 28, 2022 13:06 — forked from LordGhostX/main.go
Solana Wallet with Go
package main
import (
"context"
"fmt"
"github.com/portto/solana-go-sdk/client"
"github.com/portto/solana-go-sdk/client/rpc"
"github.com/portto/solana-go-sdk/common"
"github.com/portto/solana-go-sdk/program/sysprog"
"github.com/portto/solana-go-sdk/types"
@rafaelescrich
rafaelescrich / erc20.go
Created February 1, 2022 18:25 — forked from miguelmota/erc20.go
Go go-ethereum watch ERC-20 token transfer events
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package token
import (
"math/big"
"strings"
ethereum "github.com/ethereum/go-ethereum"
@rafaelescrich
rafaelescrich / estimate_gas.go
Created November 10, 2021 20:57 — forked from miguelmota/estimate_gas.go
Go estimate ethereum transaction gas limit and add 30% percent
package main
import (
"context"
"fmt"
"log"
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"
@rafaelescrich
rafaelescrich / engine.c
Created August 12, 2021 18:32 — forked from druska/engine.c
Quant Cup 1's winning order book implementation
/*****************************************************************************
* QuantCup 1: Price-Time Matching Engine
*
* Submitted by: voyager
*
* Design Overview:
* In this implementation, the limit order book is represented using
* a flat linear array (pricePoints), indexed by the numeric price value.
* Each entry in this array corresponds to a specific price point and holds
* an instance of struct pricePoint. This data structure maintains a list