Skip to content

Instantly share code, notes, and snippets.

View kjorg50's full-sized avatar

Kyle Jorgensen kjorg50

  • Workday
  • Pleasanton, CA
View GitHub Profile
#!/bin/bash
# ignore the 'tempest' projects and users since those are created by chef
for i in server image domain role network subnet volume keypair; do
echo = cleaning $i list =
for j in $(openstack $i list | grep tempest | awk '{print $2}'); do
if [ $i = 'domain' ]; then
openstack $i set --disable $j && openstack $i delete $j
else
openstack $i delete $j
#!/bin/bash
for i in server image project user domain role network subnet volume keypair; do
echo = $i list =
openstack $i list
done
echo = security group list =
openstack security group list
@kjorg50
kjorg50 / PlayDynamicCustomForms.md
Last active July 21, 2017 17:48
Java Play Framework - Dynamic, Custom Forms

Play Framework Dynamic Forms

This post is intended to summarize my efforts in creating a dynamic form with custom data objects in the Java Play Framework. The version I am working with is 2.3.7. This example proved to be very useful

Motivation

I have a CSVData class in my app, and I want to create instances of this class via form input. Here are the basic attributes of this class, with annotations removed for brevity:

public class CSVData extends VirtualSensor implements CSVWrappable {

 // used by play to save it in the DB
@kjorg50
kjorg50 / Bootstrapify.md
Last active August 29, 2015 14:14
Adding Bootstrap 3 to Play 2.3

Steps I took to add Bootstrap to the Play 2.3 Hello World app.

  1. Added the following dependencies to the build.sbt file for the project
  "org.webjars" %% "webjars-play" % "2.3.0-2",
  "org.webjars" % "bootstrap" % "3.3.2",
  "org.webjars" % "jquery" % "2.1.3"

The jquery one isn't necessary, but I added it because I might want it in the future.

#!/bin/bash
# chkconfig: 345 20 80
# description: Play start/shutdown script
# processname: play
#
# Instalation:
# copy file to /etc/init.d
# chmod +x /etc/init.d/play
# chkconfig --add /etc/init.d/play
# chkconfig play on