Skip to content

Instantly share code, notes, and snippets.

{"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36","environment":{"networkUserAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36","hostUserAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36","benchmarkIndex":1280},"lighthouseVersion":"4.0.0","fetchTime":"2019-05-15T23:25:10.934Z","requestedUrl":"https://rl.nickb.dev/","finalUrl":"https://rl.nickb.dev/","runWarnings":[],"runtimeError":{"code":"NO_ERROR","message":""},"audits":{"is-on-https":{"id":"is-on-https","title":"Uses HTTPS","description":"All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web platform APIs. [Learn more](https://
@nickbabcock
nickbabcock / patch
Last active August 29, 2019 11:06
cross patch
diff --git a/src/docker.rs b/src/docker.rs
index 99a4883..84883fd 100644
--- a/src/docker.rs
+++ b/src/docker.rs
@@ -62,7 +62,7 @@ pub fn register(target: &Target, verbose: bool) -> Result<()> {
docker_command("run")
.arg("--privileged")
.arg("--rm")
- .arg("-it")
+ .arg("-i")
package io.dropwizard.jersey.validation;
import com.google.common.base.Joiner;
import com.google.common.base.Strings;
import io.dropwizard.jersey.errors.ErrorMessage;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ParamConverter;
@nickbabcock
nickbabcock / Program.java
Created September 3, 2016 02:48
Trying to replicate bug found in dropwizard
package com.example.jetty;
import com.google.common.base.Charsets;
import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.io.CharStreams;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Handler;
@nickbabcock
nickbabcock / mustache.diff
Created August 19, 2016 14:45
dropwizard-partial-mustache
diff --git a/dropwizard-views-mustache/src/test/java/io/dropwizard/views/mustache/MustacheViewRendererTest.java b/dropwizard-views-mustache/src/test/java/io/dropwizard/views/mustache/MustacheViewRendererTest.java
index 9e08168..0de4fbf 100644
--- a/dropwizard-views-mustache/src/test/java/io/dropwizard/views/mustache/MustacheViewRendererTest.java
+++ b/dropwizard-views-mustache/src/test/java/io/dropwizard/views/mustache/MustacheViewRendererTest.java
@@ -41,6 +41,18 @@ public class MustacheViewRendererTest extends JerseyTest {
}
@GET
+ @Path("/sub")
+ public SubDirectoryView showSub() {
@nickbabcock
nickbabcock / DropRawApplication.java
Last active March 8, 2019 06:50
Dropwizard Example using Raw Jetty
package com.example;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonGenerator;
import com.google.common.base.Strings;
import io.dropwizard.Application;
import io.dropwizard.setup.Environment;
import org.eclipse.jetty.servlet.ServletHolder;
import javax.servlet.ServletException;
@nickbabcock
nickbabcock / graphite.conf
Last active December 6, 2019 06:18
Installs Graphite on CentOS 6
server {
listen 80;
root /opt/graphite/webapp/content;
location / {
# checks for static file, if not found proxy to app
try_files \$uri @app;
}
location @app {