Skip to content

Instantly share code, notes, and snippets.

View anthonydahanne's full-sized avatar

Anthony Dahanne anthonydahanne

View GitHub Profile
@anthonydahanne
anthonydahanne / README.md
Created May 26, 2020 22:02
Configure Prometheus for AWS EC2 discovery

I had trouble figuring out how to configure Prometheus EC2 instances discovery once, so I'm sharing this gist that includes some sample config that worked fine for me with Prometheus v2.17.2!

Good luck!

Keybase proof

I hereby claim:

  • I am anthonydahanne on github.
  • I am anthonydahanne (https://keybase.io/anthonydahanne) on keybase.
  • I have a public key ASBD72b9PpLKD2S6Nwt5mt8TT0rhCxeu_oSEkEjrgxNBugo

To claim this, I am signing this object:

@anthonydahanne
anthonydahanne / WebMvcConfiguration.java
Created June 1, 2015 16:51
Supporting matrix variable in Spring Boot 1.2.3
package org.ehcache.agent;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
/**
* Created by Anthony Dahanne on 2015-06-01.
*/
@Configuration
package net.dahanne.eclipse.m2e.localizer;
import java.io.File;
import java.util.Set;
import org.apache.maven.plugin.MojoExecution;
import org.apache.maven.project.MavenProject;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.m2e.core.MavenPlugin;
$ gradle --version
------------------------------------------------------------
Gradle 1.7
------------------------------------------------------------
Build time: 2013-08-06 11:19:56 UTC
Build number: none
Revision: 9a7199efaf72c620b33f9767874f0ebced135d83
@anthonydahanne
anthonydahanne / restassured-issue181
Last active December 28, 2015 16:49
RestAssured Issue #181, using 1.8.2-SNAPSHOT
given()
.log().all()
.contentType(ContentType.JSON)
.expect()
.log().all()
.statusCode(200)
.when()
.get("/agents/probeUrl/" + agentUrl);
@anthonydahanne
anthonydahanne / PhotoStation_remote_api.md
Last active July 20, 2019 02:21
*unofficial* Documentation of the Synology PhotoStation remote api

Logging in :

POST /photo/mApp/ajax/login.php HTTP/1.1
Content-Length: 113
Content-Type: application/x-www-form-urlencoded
Host: 192.168.1.2:80
Connection: Keep-Alive

action=login&username=user&passwd=password&video_formats=%5B%5B%22*%22%2C0%2C0%2C1280%2C720%2C0%2C%5B%5D%5D%5D