Skip to content

Instantly share code, notes, and snippets.

Marc Savy msavy

Block or report user

Report or block msavy

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
View ticket.rb
require 'activesupport/json_encoder'
class A
def initialize; @thing = "zoidberg"; end
def as_json(options={})
:whynot => @thing,
:this => "string"
View gist:1ebfb877a634fdfc33f1
17:39:54,958 INFO >> Executing REST Test [Update Service Plans (error 500)] - test-plan-data/services/plans/012_update-version-1.0-plans-500.resttest
17:39:54,976 WARN SQL Error: 23502, SQLState: 23502
17:39:54,977 ERROR NULL not allowed for column "VERSION"; SQL statement:
insert into ServiceVersionBean_plans (ServiceVersionBean_id, planId, version) values (?, ?, ?) [23502-168]
17:39:54,979 ERROR Error while committing the transaction
javax.persistence.RollbackException: Error while committing the transaction
at org.hibernate.ejb.TransactionImpl.commit(
at org.overlord.apiman.dt.api.jpa.AbstractJpaStorage.update(
at org.overlord.apiman.dt.api.jpa.JpaStorage.update(
at org.overlord.apiman.dt.api.jpa.JpaStorage$Proxy$_$$_WeldClientProxy.update(JpaStorage$Proxy$_$$
* Copyright 2014 JBoss Inc
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
View gist:bea9e2b39e02400b663d
[msavy@mmbp tmp]$ curl -vv -H 'Authorization: eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI3NzAyNWUzYS03Y2Q1LTQyNTgtODRhMy04MDQzODljYjViZWMiLCJleHAiOjE0MjY2MDc3NzUsIm5iZiI6MCwiaWF0IjoxNDI2NjA2NTc1LCJpc3MiOiJhcGltYW4iLCJhdWQiOiJjdXJsIiwic3ViIjoiZGRhNjRlYzAtZWNmMC00NmQ3LTk2ODgtYTc2NzdmMTk2YjViIiwiYXpwIjoiY3VybCIsInNlc3Npb25fc3RhdGUiOiJmZGFlMjQ1My1jMWIxLTRhOWEtYTgxZC02NjNhNjcxMzRhNDQiLCJhbGxvd2VkLW9yaWdpbnMiOltdLCJyZXNvdXJjZV9hY2Nlc3MiOnt9fQ.Lcer7FUviyrs92hr-7ecSq6U2XiHkXT8iTdHVj1GAbMjLozgXbQtDbO2KF8pGTCzaB9hw9ZHd50pYQDxGExc32qw7jQMblh_YcLNkNgDVvQcxyTi7LLnOSHyhAXCBpnnhLk_IxG6IfgPcJjYMIdTRaAz6E4IpEqgfGzd0zBqRVY'
* Hostname was NOT found in DNS cache
* Trying
* Connected to ( port 8080 (#0)
> GET /apiman-gateway/123/echo/1.0 HTTP/1.1
> User-Agent: curl/7.37.1
> Host:
> Accept: */*
> Authorization: eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI3NzAyNWUzYS03Y2Q1LTQyNTgtODRhMy04MDQzODljYjViZWMiLCJleHAiOjE0MjY2MDc3NzUsIm5iZiI6MCwiaWF0IjoxNDI2NjA2
View gist:1f9fbaa9530255ff84ae
XMLHttpRequest cannot load http://localhost:8080/apiman/organizations/blah/roles. The 'Access-Control-Allow-Origin' header contains multiple values 'http://localhost:2772, http://localhost:2772', but only one is allowed. Origin 'http://localhost:2772' is therefore not allowed access.
View prettified-example-with-exception.json
"@timestamp": "2015-05-01T13:53Z",
"level": "INFO",
"loggerName": "",
"thread": "default task-56",
"message": "Created an org: the-illuminati-",
"throwable": {
"message": "boom, boom, boom!",
"cause": {
"cause": null,
View example.adoc


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi enim sapien, gravida eget orci at, ullamcorper semper neque. Ut sed molestie urna. Ut id massa a velit convallis lacinia. In maximus ultrices est sed posuere. Fusce id mauris neque. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam vitae elementum metus. Mauris vitae odio a nisl convallis mattis ac a diam.

View gist:c48656a5c7a6cf112fdf
16:23:28,464 INFO [Neuronne] initialized
----------- Starting the ES node.
16:23:28,464 INFO [Neuronne] starting ...
16:23:28,471 INFO [Neuronne] bound_address {local[1]}, publish_address {local[1]}
16:23:28,477 INFO [Neuronne] apiman/B8xpdZDISjC9tceGlCkb7w
16:23:28,479 INFO [Neuronne] new_master [Neuronne][B8xpdZDISjC9tceGlCkb7w][mmbp.local][local[1]]{local=true}, reason: local-disco-initial_connect(master)
16:23:28,498 INFO [Neuronne] recovered [0] indices into cluster_state
16:23:28,527 INFO [Neuronne] bound_address {inet[/0:0:0:0:0:0:0:0:6500]}, publish_address {inet[/]}
16:23:28,527 INFO [Neuronne] started
----------- ES node was successfully started.
View apiman-oauth.bash
#!/usr/bin/env bash
# Remember to install jq (e.g. brew install jq; yum install jq; apt-get install jq)
set -e
printf "${RED}Getting OAuth2 token from Keycloak (includes access_token, refresh_token, etc):${NORMAL}\n"
KEYCLOAK_RESPONSE=`curl -s -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'username=rincewind' -d 'password=apiman' -d 'grant_type=password' -d 'client_id=apiman'`
printf "$KEYCLOAK_RESPONSE \n\n"
View gist:667739
[msavy@marc steamcannon-appliances]$ sudo rake rpm:all
(in /home/msavy/testing/steamcannon-appliances)
mkdir -p build/topdir/rhel/5/tmp
mkdir -p build/topdir/rhel/5/SPECS
mkdir -p build/topdir/rhel/5/SOURCES
mkdir -p build/topdir/rhel/5/BUILD
mkdir -p build/topdir/rhel/5/RPMS
mkdir -p build/topdir/rhel/5/SRPMS
mkdir -p build/topdir/rhel/5/RPMS/i386
mkdir -p build/topdir/rhel/5/RPMS/x86_64
You can’t perform that action at this time.