Skip to content

Instantly share code, notes, and snippets.

View SpencerCooley's full-sized avatar

Spencer Cooley SpencerCooley

View GitHub Profile
var demoApp = angular.module('demoApp', ['ngRoute']);
demoApp.controller('mainController', function($scope){
$scope.customers = [
{name: "hello", location: "world"},
{name: "hello2", location: "world1"},
{name: "hello3", location: "world2"},
{name: "hello4", location: "world3"},
{name: "hello5", location: "world4"}
]
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://membersuite.com/schemas" xmlns:con="http://membersuite.com/contracts">
<soapenv:Header>
<sch:ConciergeRequestHeader>
<sch:AccessKeyId>my_access_key</sch:AccessKeyId>
<sch:AssociationId>my_id</sch:AssociationId>
<sch:Signature>signature</sch:Signature>
</sch:ConciergeRequestHeader>
</soapenv:Header>
<soapenv:Body>
<a:SessionID i:nil="true"/>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<WhoAmIResponse xmlns="http://membersuite.com/contracts">
<WhoAmIResult xmlns:a="http://schemas.datacontract.org/2004/07/MemberSuite.SDK.Results" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:Cacheable>false</a:Cacheable>
<a:Errors xmlns:b="http://schemas.datacontract.org/2004/07/MemberSuite.SDK.Concierge"/>
<a:NotModified>false</a:NotModified>
<a:Success>true</a:Success>
<a:WorkflowExecutionID i:nil="true"/>
<a:WorkflowRunID i:nil="true"/>
from SOAPpy import WSDL
association_id = "my-association-id"
url = "http://membersuite.com/contracts/IConciergeAPIService/WhoAmI"
#The location of our webservice description
WSDLFile = url+association_id
#Object to handle the requests and responses from our
#webservice
@SpencerCooley
SpencerCooley / gist:7089874
Created October 21, 2013 19:55
example of a SOAP api call using SOAPpy
from SOAPpy import WSDL
#The location of our webservice description
WSDLFile = "http://www.webservicex.net/country.asmx?WSDL"
#Object to handle the requests and responses from our
#webservice
proxy = WSDL.Proxy(WSDLFile)
#this should print out the available methods.
@SpencerCooley
SpencerCooley / gist:7089308
Created October 21, 2013 19:16
example of soap api for sports data api.
import SOAPpy
url = "http://footballpool.dataaccess.eu/data/info.wso"
server = SOAPpy.SOAPProxy(url, 'http://footballpool.dataaccess.eu')
print server.Cities()
Output:
<SOAPpy.Types.structType CitiesResult at 4534171768>: {'string': ['Charkov', 'Donetsk', 'Gdansk', 'Kiev', 'Lviv', 'Poznan', 'Warschau', 'Wroclaw']}
@SpencerCooley
SpencerCooley / gist:6453491
Created September 5, 2013 17:39
Looks like the <a> tags are not very tall on the navigation menu. There is a 400ms delay that will keep the menu showing, but if you don't move fast enough the menu will go away.
jQuery('ul.sf-menu').superfish({
delay:400, //looks like this is what is controlling the delay, maybe make it a little longer
// pathClass: 'current-menu-item',
// speed: 'fast',
autoArrows: true, // disable generation of arrow mark-up
dropShadows: false
// animation: {opacity:'show'}
});
@SpencerCooley
SpencerCooley / gist:6224869
Created August 13, 2013 19:38
xml example using post data from a form.
$xml_data = '<SalesOrders>'.
'<row no="1">'.
'<FL val="Subject"><?php echo $_POST["subject"]; ?>!/FL>'.
'<FL val="Due Date"><?php echo $_POST["date"]; ?>!</FL>'.
'<FL val="Sub Total"><?php echo $_POST["total"]; ?>!</FL>'.
'<FL val="Tax"><?php echo $_POST["tax"]; ?>!</FL>'.
'</row>'.
'</SalesOrders>';
<VirtualHost *:80>
ServerName nodeline.com
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
WSGIDaemonProcess pyramid user=main group=main processes=1 \
threads=4 \
python-path=/home/main/modwsgi/env/lib/python2.6/site-packages
WSGIScriptAlias /myapp /home/main/modwsgi/env/pyramid.wsgi