Skip to content

Instantly share code, notes, and snippets.

Derek Bassett derekbassett

Block or report user

Report or block derekbassett

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
derekbassett /
Created Nov 28, 2018
Potential exploit for Docker Containers

Step 1. Launch a docker container

    $ docker run -it ubuntu /bin/bash

Step 2. Run the following INSIDE the container

    $ export LOCATION="SFS in Denver"
    $ sleep 1000

Step 3. Run outside the container in another window at the same time

derekbassett / pom-child.xml
Last active Oct 20, 2017
Using com.spotify:dockerfile-maven-plugin with multi-project poms.
View pom-child.xml
derekbassett / gist:c4cb100b8ec8555682d67b2338f2c669
Created Feb 25, 2017 — forked from abesto/gist:3476594
Go: Newton's method for square root
View gist:c4cb100b8ec8555682d67b2338f2c669
A Tour of Go: page 44
Exercise: Loops and Functions
As a simple way to play with functions and loops, implement the square root function using Newton's method.
In this case, Newton's method is to approximate Sqrt(x) by picking a starting point z and then repeating: z - (z*z - x) / (2 * z)
derekbassett /
Created Mar 6, 2016
An example of using Jersey's dependency injection framework in a DropWizard application.
package io.github.derekbassett.exampledropwizard
import com.mongodb.MongoClient;
import io.dropwizard.Application;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
import org.glassfish.hk2.utilities.binding.AbstractBinder;
derekbassett / gist:99f7d496370b1f21af9e
Created May 17, 2015
Debugging Data Contexts in Meteor
View gist:99f7d496370b1f21af9e
Alternatively, if you need to find out more about the data context of a specific template fragment, you can also write a dedicated {{log}} helper:
log: function () {
And use it directly in your templates:
<template name="profile">
derekbassett /
Created Nov 13, 2014
Simple instructions on how to add an Async Servlet to an Embedded Tomcat
public class Main {
private static final int PORT = 8085;
public static void main(String args[]){
Tomcat server = new Tomcat();
Context ctx = server.addContext("/ctx0", new File(".").getAbsolutePath());
Wrapper wrapper = Tomcat.addServlet(ctx, "MyAsyncServlet", new MyAsyncServlet());
You can’t perform that action at this time.