Skip to content

Instantly share code, notes, and snippets.


Ken Rimple krimple

View GitHub Profile
krimple /
Last active May 8, 2019
Philly DevDays 2019 Snippets
krimple / 00-docker-compose.yml
Last active May 3, 2019
A full-stack Docker configuration with Dockerfiles and docker-compose. Repo and multiple blog posts coming soon. Note - couldn't put directory names in file names, so underscores replace folders.
View 00-docker-compose.yml
version: "3.7"
container_name: quizzo-apache
context: ./apache/
dockerfile: Dockerfile-apache
- ${CONFIG_DIR}/apache/httpd.conf:/usr/local/apache2/conf/httpd.conf:ro
krimple / wsl.conf
Created Dec 10, 2018
Working wsl.conf
View wsl.conf
enabled = true
root = /mnt/
options = "metadata,umask=22,fmask=11"
mountFsTab = false
generateHosts = true
generateResolvConf = true
krimple / boxstarter.ps1
Last active Dec 9, 2018 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
View boxstarter.ps1
# Description: Boxstarter Script
# Author: Jess Frazelle <>
# Last Updated: 2017-09-11
# Install boxstarter:
# . { iwr -useb } | iex; get-boxstarter -Force
# You might need to set: Set-ExecutionPolicy RemoteSigned
# Run this boxstarter by calling the following from an **elevated** command-prompt:
krimple / demo.ts
Created Sep 16, 2016
Object.create isn't a direct clone - it's a prototype assignment
View demo.ts
class Foo {
constructor(public bar: string) { }
let f1 = new Foo('demovalue');
let f2 = Object.create(f1);
console.log(`f1 = ${JSON.stringify(f1)}`);
console.log(`f2 = ${JSON.stringify(f2)}`); = 'changed';
krimple /
Last active Jun 7, 2018
Test and class under test for Http mocking - Angular 2 beta 1

This snippet is a working example of a test against the Http service in Angular 2.0.

It is a very simple test, and provides an example of how to:

  • Provide the right wiring to the test injector
  • Inject the fake XHRBackend (i.e. MockBackend)
  • Define a potential request
  • Run the request in the framework
  • Set expectations on the result
krimple / gist:536095a76c383b5b4df6
Created Jan 28, 2015
Using angular.copy for modal fetch and update of data
View gist:536095a76c383b5b4df6
['$log', function($log) {
var namesSpokenTo = [];
this.sayHello: function(name) {
$log.debug('hello, ' + name);
this.getNames = function() {
return angular.copy(namesSpokenTo);
krimple / gist:2623501
Created May 6, 2012
The problem create.tagx file
View gist:2623501
<jsp:root xmlns:c="" xmlns:fn="" xmlns:util="urn:jsptagdir:/WEB-INF/tags/util" xmlns:form="" xmlns:jsp="" xmlns:spring="" version="2.0">
<jsp:output omit-xml-declaration="yes"/>
<jsp:directive.attribute name="id" type="java.lang.String" required="true" rtexprvalue="true" description="The identifier for this tag (do not change!)"/>
<jsp:directive.attribute name="modelAttribute" type="java.lang.String" required="true" rtexprvalue="true" description="The name of the model attribute for form binding"/>
<jsp:directive.attribute name="path" type="java.lang.String" required="true" rtexprvalue="true" description="Specify the relative URL path (wit leading /)" />
<jsp:directive.attribute name="compositePkField" type="java.lang.String" required="false" rtexprvalue="true" description="The field name of the composite primary key (only us
krimple / gist:2623491
Created May 6, 2012
Incorrect form Configuration for using tags (embeds 'tag' as field)
View gist:2623491
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<div xmlns:c=""
xmlns:spring="" version="2.0">
< contentType="text/html;charset=UTF-8"/>
<jsp:output omit-xml-declaration="yes"/>
<form:create id="fc_com_t_coursemanager_model_Tag" modelAttribute="tag"
krimple / gist:2623484
Created May 6, 2012
Example Spring JUnit test to verify Roo converters
View gist:2623484
package com.t.coursemanager.web;
import static org.hamcrest.MatcherAssert.assertThat;
import static;
import static org.hamcrest.Matchers.notNullValue;
import org.apache.log4j.Logger;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
You can’t perform that action at this time.