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.
  • 14:05 (UTC +02:00)
View GitHub Profile
@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": "dferrandizmont@gmail.com",
"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";
}
@dferrandizmont
dferrandizmont / public-apis.md
Created January 10, 2019 09:09
[Public APIs 3] inglés #api

Public-APIs Twitter: @abgbm Build Status PRs Welcome

This is an attempt to categorise different APIs scoured from the web which make their resources available for consumption.

*Items marked with Open Source are open-source *Items marked with 💸 are trial based APIs

Table of Contents

@dferrandizmont
dferrandizmont / awesome-api.md
Created January 10, 2019 09:08
[Public APIs 2] inglés #api

Awesome API Awesome Build Status Donate

A curated list of awesome resources for design and implement RESTful APIs.

Design

Overview

REST allows us to create services and applications that can be used by any device or client who understands HTTP.

@dferrandizmont
dferrandizmont / public-apis.md
Created January 10, 2019 09:07
[Public APIS ENG] apis públicas en ingles #api

Public APIs Build Status

A collective list of free APIs for use in software and web development.

Sponsor:

A public API for this project can be found here - thanks to DigitalOcean for helping us provide this service!

@dferrandizmont
dferrandizmont / lifetime-management.md
Last active January 8, 2019 14:25
[PART 1.2 Lifetime management] #rxjava #rxjavaguide

Lifetime management

The idea behind Rx is that it is unknown when a sequence emits values or terminates, but you still have control over when you begin and stop accepting values. Subscriptions may be linked to allocated resources that you will want to release at the end of a sequence. Rx provides control over your subscriptions to enable you to do that.

Subscribing

There are several overloads to Observable.subscribe, which are shorthands for the same thing.

Subscription subscribe()
@dferrandizmont
dferrandizmont / key-types.md
Last active January 8, 2019 14:26
[PART 1.1 Key types] #rxjava #rxjavaguide

Key types

Rx is based around two fundamental types, while several others expand the functionality around the core types. Those two core types are the Observable and the Observer, which will be introduced in this chapter. We will also introduce Subjects, which ease the learning curve.

Rx builds upon the Observer pattern. It is not unique in doing so. Event handling already exists in Java (e.g. JavaFX's EventHandler). Those are simpler approaches, which suffer in comparison to Rx:

  • Events through event handlers are hard to compose.
  • They cannot be queried over time
  • They can lead to memory leaks
  • These is no standard way of signaling completion.
@dferrandizmont
dferrandizmont / why-rx.md
Last active January 8, 2019 14:25
[PART 1.0 - Getting started] Why Rx #rxjava #rxjavaguide

PART 1 - Getting started

Why Rx

Users expect real time data. They want their tweets now. Their order confirmed now. They need prices accurate as of now. Their online games need to be responsive. As a developer, you demand fire-and-forget messaging. You don't want to be blocked waiting for a result. You want to have the result pushed to you when it is ready. Even better, when working with result sets, you want to receive individual results as they are ready. You do not want to wait for the entire set to be processed before you see the first row. The world has moved to push; users are waiting for us to catch up. Developers have tools to push data, this is easy. Developers need tools to react to push data

Welcome to Rx. This book is based on Rx.NET's www.introtorx.com and it introduces beginners to RxJava, the Netflix implementation of the original Microsoft library. Rx is a powerful tool that enables the solutio