Skip to content

Instantly share code, notes, and snippets.

Avatar

Nick Babcock nickbabcock

View GitHub Profile
View rl.nickb.dev-20190515T182510.json
{"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 Aug 29, 2019
cross patch
View 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")
View ValidatingEnumParamConverterProvider.java
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 Sep 3, 2016
Trying to replicate bug found in dropwizard
View Program.java
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 Aug 19, 2016
dropwizard-partial-mustache
View mustache.diff
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 Mar 8, 2019
Dropwizard Example using Raw Jetty
View DropRawApplication.java
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 Dec 6, 2019
Installs Graphite on CentOS 6
View graphite.conf
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 {
You can’t perform that action at this time.