Skip to content

Instantly share code, notes, and snippets.

View Turupawn's full-sized avatar
🇭🇳
Karaoke veteran

Ahmed Castro Turupawn

🇭🇳
Karaoke veteran
View GitHub Profile
@Turupawn
Turupawn / fe_jam.fe
Created February 26, 2025 14:35
Fe jam 25 feb 2025
// std/evm.fe
mod std {
pub mod evm {
pub type Address = u256
pub struct Wei { value: usize }
pub struct Ptr { pub location: usize }
pub struct Buf { pub offset: Ptr, pub len: usize }
const HASH_SCRATCH_OFFSET: u256 = 0x0
extern {
pub fn __call(gas: Wei, address: Address, value: Wei, args: Buf, ret: Buf)
@Turupawn
Turupawn / run.sh
Created February 20, 2025 19:36
AI subtitles
## Install
sudo dnf install ffmpeg
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install ffmpeg
sudo dnf install python3 python3-pip
pip install openai-whisper
@Turupawn
Turupawn / eas.sol
Created November 6, 2024 09:02
Eas test
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import { IEAS, AttestationRequest, AttestationRequestData, RevocationRequest, RevocationRequestData } from "@ethereum-attestation-service/eas-contracts/contracts/IEAS.sol";
import { NO_EXPIRATION_TIME, EMPTY_UID } from "@ethereum-attestation-service/eas-contracts/contracts/Common.sol";
contract SwapAttestation
{
address easAddress = 0xaEF4103A04090071165F78D45D83A0C0782c2B2a;
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] GET /debug/pprof/ --> github.com/gin-contrib/pprof.RouteRegister.WrapF.func1 (2 handlers)
[GIN-debug] GET /debug/pprof/cmdline --> github.com/gin-contrib/pprof.RouteRegister.WrapF.func2 (2 handlers)
[GIN-debug] GET /debug/pprof/profile --> github.com/gin-contrib/pprof.RouteRegister.WrapF.func3 (2 handlers)
[GIN-debug] POST /debug/pprof/symbol --> github.com/gin-contrib/pprof.RouteRegister.WrapF.func4 (2 handlers)
[GIN-debug] GET /debug/pprof/symbol --> github.com/gin-contrib/pprof.RouteRegister.WrapF.func5 (2 handlers)
[GIN-debug] GET /debug/pprof/trace --> github.com/gin-contrib/pprof.RouteRegister.WrapF.func6 (2 handlers)
@Turupawn
Turupawn / 01_Array.sol
Last active October 9, 2024 16:45
L1Sload Advanced structures
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract L1ArrayDemo {
uint[5] myArray;
constructor() {
myArray[0] = 10;
myArray[1] = 20;
myArray[2] = 30;
@Turupawn
Turupawn / gist:7c17aa2e2b0e4e6fa10794d4eb4f3583
Last active October 15, 2024 16:17
aave challenge respuesta
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
// In this example, the DataTypes library is used to query the AToken address that corresponds DAI
// Later, we will use the getReserveData that will return a ReserveData object.
// Aave docs: https://docs.aave.com/developers/core-contracts/pool#getreservedata
library DataTypes {
struct ReserveConfigurationMap {
uint256 data;
}
@Turupawn
Turupawn / 4TK_bot.js
Created September 11, 2024 20:52
run with `node 4TK_bot.js`
const Web3 = require('web3');
const cron = require('node-cron');
// Replace with your Ethereum node provider URL
const web3 = new Web3('https://rpc.garnetchain.com');
// Replace with your smart contract ABI and address
const contractABI = [
{
"inputs": [
@Turupawn
Turupawn / map.json
Last active September 4, 2024 19:44
big map
This file has been truncated, but you can view the full file.
{
"map": [
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0
@Turupawn
Turupawn / maci-v2-trusted-setup-ceremony_attestation.log
Created August 27, 2024 03:20
Attestation for MACI v2 Trusted Setup Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm Turupawn-707484 and I have contributed to the MACI v2 Trusted Setup Ceremony.
The following are my contribution signatures:
Circuit # 1 (processmessages_14-9-2-3)
Contributor # 227
Contribution Hash: 22b16f16 7b2b923b 267c4764 6adf9b77
8dc3da5b dc6ee215 7f7009bd ba353c44
2d5e409a 6176b2b4 f4190d19 407aae46
9cc73c66 9a4da55f db5e7d4d 8ebb9c18
@Turupawn
Turupawn / links.md
Last active August 25, 2024 00:50
Autonomous World Links