Skip to content

Instantly share code, notes, and snippets.

Avatar

Ian Gable igable

View GitHub Profile
View swagger.json
{
"swagger" : "2.0",
"info" : {
"description" : "Prototype Dispatcher API documention",
"version" : "2.0.0",
"title" : "DCM Dispatcher API V2"
},
"host" : "localhost:8081",
"basePath" : "/rest/v2",
"tags" : [ {
View sha256-in-browser.html
<html>
<body>
SHA256 Hash of "Message" is:
<span id="hash"></span>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.3.0/prototype.js"></script>
<script type="text/javascript">
var Crypto = Class.create();
View sha256-service-now-script-include.js
var Crypto = Class.create();
Crypto.prototype = {
initialize: function() {
/**
* CryptoJS core components.
*/
var CryptoJS = CryptoJS || (function (Math, undefined) {
/**
* CryptoJS namespace.
@igable
igable / traceback.py
Created Jul 24, 2015
mixcoatl errors on Ubuntu 12.04 with python 2.7
View traceback.py
[2015-07-24, 7:43:23 AM] Syam Puchakayala: /usr/local/lib/python2.7/dist-packages/requests-2.7.0-py2.7.egg/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Traceback (most recent call last):
File "/usr/local/bin/dcm-list-servers", line 5, in <module>
pkg_resources.run_script('mixcoatl==1.0.2', 'dcm-list-servers')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/mixcoatl-1.0.2-py2.7.egg/EGG-INFO/scripts/dcm-list-servers", line 54, in <modu
@igable
igable / traceback.py
Created Jul 23, 2015
readthedocs.org build failure for mixcoatl. I get this the second time I build on readthedocs.org
View traceback.py
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/mixcoatl/envs/stable/local/lib/python2.7/site-packages/sphinx/cmdline.py", line 244, in main
opts.warningiserror, opts.tags, opts.verbosity, opts.jobs)
File "/home/docs/checkouts/readthedocs.org/user_builds/mixcoatl/envs/stable/local/lib/python2.7/site-packages/sphinx/application.py", line 143, in __init__
self.setup_extension(extension)
File "/home/docs/checkouts/readthedocs.org/user_builds/mixcoatl/envs/stable/local/lib/python2.7/site-packages/sphinx/application.py", line 433, in setup_extension
err)
ExtensionError: Could not import extension readthedocs_ext.readthedocs (exception: cannot import name InsecurePlatformWarning)
Extension error:
View testing-multiple-endpoint.md

To test this code in a virtualenv

mkdir mixcoatl
virtualenv mixcoatl
cd mixcoatl/
source bin/activate
git clone https://github.com/igable/mixcoatl.git
cd mixcoatl/
git fetch --all
@igable
igable / jenkins.sh
Created Jul 15, 2015
Make some examples files for life DCM endpoint testing with Mixcoatl
View jenkins.sh
#!/usr/bin/env bash
#
# Create some example files for interactive live testing
# these could possibly be rolled into the mixcoatl repo proper
#
if [ ! -d secret-test-data ]; then mkdir secret-test-data; fi
cat <<'EOF' > secret-test-data/endpoints.json
@igable
igable / install-scipy-virtualenv-yosemite.md
Last active Aug 29, 2015
Instructions for installing scipy on OSX Yosemite using python Virtual Environment
View install-scipy-virtualenv-yosemite.md

Install homebrew:

xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install python 2.7 from homebrew:

brew install python
brew install gcc
brew install wget
@igable
igable / shoal-agent-build.sh
Created Mar 12, 2015
Building the shoal-agent RPM on CentOS 7 rough notes
View shoal-agent-build.sh
# building the pika and netifaces RPM dependencies for shoal-agent on CentOS7
#
# These are rough notes grabbed from my history. You can't just run this.
#
#
# There is a bug in distutils that affects building netifaces. You need to
# patch that first.
#
# https://bugzilla.redhat.com/show_bug.cgi?id=1177613
You can’t perform that action at this time.