Skip to content

Instantly share code, notes, and snippets.

View dkhenry's full-sized avatar

Daniel Kozlowski dkhenry

View GitHub Profile
@dkhenry
dkhenry / api2.wsdl
Created September 20, 2011 15:04
WSDL Excerpt that causes Exception
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" name="SevOneApi" targetNamespace="http://www.sevone.com/" xmlns:tns="http://www.sevone.com/" xmlns:impl="http://www.sevone.com/" xmlns:xsd1="http://www.sevone.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.sevone.com/">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />
<complexType name="SO_Unit">
<sequence>
<element name="id" type="xsd:integer"/>
<element name="name" type="xsd:string"/>
<element name="abbreviation" type="xsd:string"/>
@dkhenry
dkhenry / gist:1229508
Created September 20, 2011 16:01
scalaxb full output
[processReaders: ListBuffer(api2.wsdl, encoding.xsd)]
[wsdl11.Driver#toImportable: file:/home/dkozlowski/svn-src/ScalaSoap/api2.wsdl]
[wsdl11.Driver#toImportable: file:/home/dkozlowski/svn-src/ScalaSoap/encoding.xsd]
[wsdl11.Driver: XDefinitionsType(None,List(),Some(XTypesType(None,List(DataRecord({http://www.w3.org/2001/XMLSchema}schema,<schema targetNamespace="http://www.sevone.com/" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://www.sevone.com/" xmlns:impl="http://www.sevone.com/" xmlns:tns="http://www.sevone.com/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<xsd:import schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.xmlsoap.org/soap/encoding/"></xsd:import>
<complexType name="SO_Unit">
<sequence>
<element type="xsd:integer" name="id
@dkhenry
dkhenry / gist:2702947
Created May 15, 2012 16:10
Example of PHP traits
trait DatabaseToObject {
public static function fromResultSet( $results) {
$retval = array();
if(!$results) {
return $retval;
}
while( $row = $results->fetchObject() ) {
$retval[] = static::construct($row);
}
return $retval;
@dkhenry
dkhenry / deferred_data.php
Created June 27, 2012 15:06
SevOne deferred data example
<?php
/**
Program to upload data to SevOne using the Deferred Data API
@author DK (dkozlowski@sevone.com)
@version 0.1
@since 27-June-2012
*/
//! The Appliance IP
@dkhenry
dkhenry / play2.service
Created January 6, 2013 21:28
Systemd script for the Play Framework
[Unit]
Description=Play2 Server for <site>
After=network.target
 
[Service]
Type=simple
PIDFile=<path>/RUNNING_PID
 
ExecStartPre=/bin/sh -c 'cd <path> ;/bin/rm RUNNING_PID ; sbt clean compile stage'
ExecStart=<path>/target/start
@dkhenry
dkhenry / gist:4696023
Created February 2, 2013 03:41
Install rethinkdb on Fedora 18 ( as of Feb 1st 2013 )
# Install the build deps
sudo yum install --enablerepo=updates-testing --skip-broken gcc-c++ protobuf-compiler protobuf-c protobuf-c-devel protobuf-devel boost-devel openssl-devel v8-devel gperftools-devel nodejs npm curl ctags-etags m4 rubygems protobuf-static boost-static
# install the ruby deps
sudo gem install ruby_protobuf
# install npm manuall ( yum is broken currently )
git clone https://github.com/isaacs/npm.git
cd npm
make
@dkhenry
dkhenry / AggregateionFramework.scala
Created March 9, 2013 19:25
Using the Aggregation framework for MongoDB in scala to bucketize time stamped data
import com.mongodb.casbah.Imports._
/**
* Scheme has this general format ( amongst other fields )
* { "_id" : ObjectId("5138c8bd5e0ee06dd30a6ee1"),
* "LAST_SIZE" : NumberLong(200),
* "SYMBOL" : "AAPL",
* "LAST_PRICE" : 428.31,
* "TOTAL_VOLUME" : NumberLong(8923961),
* "TIMESTAMP" : ISODate("2013-03-07T17:05:01.144Z"),
*}
@dkhenry
dkhenry / README.md
Last active December 24, 2015 02:29
Using git-deploy and systemd to deploy Play2 webdsites

This uses systemd to control a play2 service

I also am including the git-deploy configuration to update and restart the service from a devleopment machine

  • play2.service

    The SystemD script Place in /etc/systemd/system/

  • after_push

    The after push configuration file > goes in /deploy

This file has been truncated, but you can view the full file.
execve("/usr/local/bin/cargo", ["cargo", "build"], [/* 56 vars */]) = 0
brk(0) = 0x7f2d717cd000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2d6fba4000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=49275, ...}) = 0
mmap(NULL, 49275, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f2d6f4a8000
close(3) = 0
open("/lib64/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\"\300\2719\0\0\0@\0\0\0\0\0\0\0\250\256\0\0\0\0\0\0\0\0\0\0@\0008\0\t\0@\0*\0)\0\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\300\2719\0\0\0@\0\300\2719\0\0\0\370\1\0\0\0\0\0\0\370\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\3\0\0\0\4\0\0\0\20R\0\0\0\0\0\0\20R\300\2719\0\0\0\20R\300\2719\0\0\0\34\0\0\0\0\0\0\0\34\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\300\2719\0\0\0\0\0\300\2719\0\0\0\30d\0\0\
@dkhenry
dkhenry / vitess.crd.yaml
Created August 13, 2018 23:55
Custom Resources for Vitess Cluster
---
apiVersion: vitess.io/v1alpha2
kind: VitessCluster
metadata:
name: superawesomecluster
labels:
app: vitess
spec:
lockserver:
type: etcd3