Skip to content

Instantly share code, notes, and snippets.

View dferrandizmont's full-sized avatar
🏠
Working from home

Daniel Mont Ferrandiz dferrandizmont

🏠
Working from home
  • Terrassa, Barcelona.
  • 00:54 (UTC +02:00)
View GitHub Profile
@dferrandizmont
dferrandizmont / ainstall.md
Created July 17, 2025 19:54 — forked from burkeholland/ainstall.md
Beast Mode v3

Beast Mode v3

Beast Mode is a custom chat mode for VS Code agent that adds an opinionated workflow to the agent, including use of a todo list, extensive internet research capabilities, planning, tool usage instructions and more. Designed to be used with 4.1, although it will work with any model.

Installation Instructions

  • Go to the "agent" dropdown in VS Code chat sidebar and select "Configure Modes".
  • Select "Create new custom chat mode file"
  • Select "User Data Folder"
  • Give it a name (Beast Mode)
@dferrandizmont
dferrandizmont / solsender.js
Created December 2, 2024 07:32 — forked from LanfordCai/solsender.js
Solana Batch Transfer
'use strict'
const web3 = require('@solana/web3.js')
const splToken = require('@solana/spl-token')
const bs = require('bs58')
const connection = new web3.Connection(
web3.clusterApiUrl('devnet'),
'confirmed',
)
@dferrandizmont
dferrandizmont / rpc_fetch_raydium_pool_init.ts
Created June 21, 2024 12:52 — forked from rubpy/rpc_fetch_raydium_pool_init.ts
Finds Raydium AMM pool initialization transaction (partially deserializes pool state, calls getSignaturesForAddress, searches for a Raydium innerInstruction, etc.).
import * as web3 from "@solana/web3.js";
import bs58 from "bs58";
//////////////////////////////////////////////////
function findInstructionsInTransaction(
tx: web3.ParsedTransactionWithMeta,
predicate?: (instruction: web3.ParsedInstruction | web3.PartiallyDecodedInstruction, outerInstruction: (web3.ParsedInstruction | web3.PartiallyDecodedInstruction) | null) => boolean,
): Array<web3.ParsedInstruction | web3.PartiallyDecodedInstruction> {
if (!tx || !tx.meta || !tx.transaction || !tx.transaction.message || !tx.transaction.message.instructions) {
@dferrandizmont
dferrandizmont / raydium_sdk_v2_example.ts
Created June 21, 2024 12:51 — forked from rubpy/raydium_sdk_v2_example.ts
Fetching pool info and determining prices of token/SOL & SOL/USDC pairs via Raydium SDK V2.
import * as raydium from "@raydium-io/raydium-sdk-v2";
//////////////////////////////////////////////////
const RAYDIUM_CLMM_SOL_USDC_ID = "2QdhepnKRTLjjSqPL1PtKNwqrUkoLee5Gqs8bvZhRdMv";
function normalizeRaydiumBetaPoolInfoResponse(response: raydium.ApiV3PoolInfoItem[] | raydium.ApiV3PageIns<raydium.ApiV3PoolInfoItem>): raydium.ApiV3PoolInfoItem[] {
if (response === null || typeof response !== "object") {
return [];
}
@dferrandizmont
dferrandizmont / rpc_fetch_metaplex_token_metadata.ts
Created June 21, 2024 12:51 — forked from rubpy/rpc_fetch_metaplex_token_metadata.ts
Fetching on-chain Metaplex token metadata (through lightweight getAccountInfo).
import * as web3 from "@solana/web3.js";
import {
MPL_TOKEN_METADATA_PROGRAM_ID,
MetadataAccountData as MplMetadataAccountData,
getMetadataAccountDataSerializer,
} from "@metaplex-foundation/mpl-token-metadata";
//////////////////////////////////////////////////
const METAPLEX_PROGRAM_ID = new web3.PublicKey(MPL_TOKEN_METADATA_PROGRAM_ID);
@dferrandizmont
dferrandizmont / rpc_fetch_token_mint_info.ts
Created June 21, 2024 12:51 — forked from rubpy/rpc_fetch_token_mint_info.ts
Fetching basic token (mint) info (through getAccountInfo), e.g.: total supply, mintAuthority, freezeAuthority...
import * as web3 from "@solana/web3.js";
import { TOKEN_PROGRAM_ID, unpackMint, Mint } from "@solana/spl-token";
//////////////////////////////////////////////////
async function getTokenInfo(conn: web3.Connection, tokenMint: web3.PublicKey): Promise<Mint | null> {
const info = await conn.getAccountInfo(tokenMint);
if (!info) return null;
try {
@dferrandizmont
dferrandizmont / uniswap-v3-example.sol
Created December 11, 2023 21:47 — forked from mempirate/uniswap-v3-example.sol
Simple example on how to swap on UniswapV3 with the SwapRouter
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
pragma abicoder v2;
import "@uniswap/v2-periphery/contracts/interfaces/IWETH.sol";
import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol";
import "@uniswap/v3-core/contracts/libraries/LowGasSafeMath.sol";
import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Daniel Ferrandiz Mont",
"label": "Java Developer",
"image": "",
"email": "[email protected]",
"phone": "637979142",
"url": "",
"summary": "I would consider myself detail-oriented, even though my strong suit is backend development, I cannot ignore my inner designer who pays close attention to the presentation of everything, such as typography, button color, code indentation, and margins. I am a team player, and knowledge sharing is the most important aspect of work for me. Thanks to it, I grow every day, and I couldn't imagine a week without learning something new.\n\nI have worked with people who speak my own language, as well as English, Czech, Slovak, Russian, and one of the most enjoyable things is trying to learn the basics of their language. The look of excitement on their face when you try to say something in their language is priceless.\n\nI am a Java
@dferrandizmont
dferrandizmont / docker.md
Created April 13, 2022 11:10 — forked from zmts/docker.md
Docker, TypeScript, Node.js

Docker, TypeScript, Node.js

Preconditions:

  • TS application listening port: 7777
|-- dist
|-- src
|-- .dockerignore
|-- Dockerfile
@dferrandizmont
dferrandizmont / ruta-imagen-report.java
Last active January 28, 2019 09:13
[Obtener ruta imágenes report] #report #scriptlet
public String getLogoInforme() {
return FacesContext.getCurrentInstance().getExternalContext().getRealPath("") + "/resources/imagenes/" + "vinclesweb_logo.png";
}