Skip to content

Instantly share code, notes, and snippets.

Avatar
🍌
I AM A BANANA

David Kowis dkowis

🍌
I AM A BANANA
View GitHub Profile
@dkowis
dkowis / Dockerfile
Created Mar 20, 2014
Dockerfile for jenkins JNLP slave
View Dockerfile
# base image
FROM centos
# slavename variable
ENV SLAVENAME derpSlave
RUN yum -y install java-1.7.0-openjdk-devel java-1.7.0-openjdk git rpm-build
RUN adduser -d /opt/jenkins jenkins
# install maven
View CnormMediaTypeTest.groovy
package com.rackspace.papi.components.cnorm
import com.rackspace.papi.commons.util.servlet.http.ReadableHttpServletResponse
import com.rackspace.papi.components.normalization.config.ContentNormalizationConfig
import com.rackspace.papi.components.normalization.config.MediaType
import com.rackspace.papi.components.normalization.config.MediaTypeList
import com.rackspace.papi.filter.logic.FilterDirector
import spock.lang.Specification
import javax.servlet.http.HttpServletRequest
@dkowis
dkowis / gist:358b0da54f21e4ef1361
Created May 15, 2014
Just the feature file output
View gist:358b0da54f21e4ef1361
$ rake features
/home/dkowis/.rvm/rubies/ruby-2.1.2/bin/ruby -S bundle exec cucumber features --format pretty
Feature: Feed candy to elephants
A Little Elephant and his friends from the Zoo of Lviv like candies very much.
There are N elephants in the Zoo. The elephant with number K (1 ≤ K ≤ N) will be happy if he receives at least A[K]
candies. There are C candies in all in the Zoo.
The Zoo staff is interested in knowing whether it is possible to make all the N elephants happy by giving each
elephant at least as many candies as he wants, that is, the Kth elephant should receive at least A[K] candies. Each
View gist:2c623a5f0cfe9825463b
[snapshots]
name=Snapshots
baseurl=http://protorepo.openrepose.org/nexus/content/repositories/snapshots
enabled=1
protect=0
gpgcheck=0
metadata_expire=30s
autorefresh=1
type=rpm-md
View gist:d74e9527ebf77ce14e0d
# git shell stuff of awesomeness
# do cool color things with the shell line
c_cyan=`tput setaf 6`
c_red=`tput setaf 1`
c_green=`tput setaf 2`
c_sgr0=`tput sgr0`
parse_git_branch ()
{
if /usr/bin/git rev-parse --git-dir >/dev/null 2>&1
View gist:ec5aac15e927a9a59083
puppet agent output:
Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install java' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package java
Error: /Stage[main]/Java/Package[java]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install java' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package java
View RomanTest.scala
import org.scalatest.{Matchers, FunSpec}
class RomanTest extends FunSpec with Matchers {
val testCases = Map(
"CCXCI" -> 291
)
describe("Converting arabic numerals to roman numerals") {
describe("Defining the range of our problem") {
@dkowis
dkowis / RomanConvert.scala
Created Jul 24, 2014
Scala Coding Dojo files
View RomanConvert.scala
object RomanConvert {
val arabic = List(
"I" -> 1,
"IV" -> 4,
"V" -> 5,
"IX" -> 9,
"X" -> 10,
"XL" -> 40,
"L" -> 50,
"XC" -> 90,
@dkowis
dkowis / Project Structure.md
Last active Aug 29, 2015
Repose Project Structure Proposal
View Project Structure.md

Existing project structure

  • repose
    • documentation
    • repose-aggregator
      • commons
        • classloader
        • configuration
        • jetty
        • utilities
View war Extraction.txt
$  unzip -l war-1.NOPE.war
Archive: war-1.NOPE.war
Length Date Time Name
--------- ---------- ----- ----
0 2014-09-23 12:05 META-INF/
25 2014-09-23 12:05 META-INF/MANIFEST.MF
0 2014-09-23 12:05 WEB-INF/
0 2014-09-23 12:05 WEB-INF/classes/
0 2014-09-23 11:29 WEB-INF/classes/org/
0 2014-09-23 11:29 WEB-INF/classes/org/protorepose/
You can’t perform that action at this time.