Skip to content

Instantly share code, notes, and snippets.

View dmarcosl's full-sized avatar

Daniel Marcos Lorrio dmarcosl

View GitHub Profile
@dmarcosl
dmarcosl / JsonUtils.java
Last active November 1, 2024 11:55
Comparing 2 unordered jsons with Jackson
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.exceptions.JsonHandleException;
import java.util.Iterator;
import java.util.Map;
public class JsonUtils {
private static final ObjectMapper mapper = new ObjectMapper();
@dmarcosl
dmarcosl / Angular FireStore zip download
Last active December 12, 2023 03:02
Download several files from Firebase Storage through an Angular8 application in zip format
// dependencies
// angular 8
// "firebase": "^7.6.1",
// "file-saver": "^2.0.2",
// "jszip": "^3.2.2"
@dmarcosl
dmarcosl / haruhi.py
Last active February 27, 2019 10:31
My solution to the "Haruhi Problem" http://mathsci.wikia.com/wiki/The_Haruhi_Problem
"""
You have an n episode TV series. You want to watch the episodes in every order possible.
What is the least number of episodes that you would have to watch?
Overlapping is not allowed. For example, in the case of n=2, watching episode 1, then 2, then 1 again,
would not fit the criteria.
The orders must be continuous. For example, (1,3,2) does NOT contain the sequence (1,2,3)
"""