This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf import settings | |
from django.conf.urls import patterns, url, include | |
from django.conf.urls import patterns | |
from django.views.decorators.csrf import csrf_exempt | |
from .views cached_api_proxy_view | |
urlpatterns = patterns('') | |
urlpatterns += patterns('', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import xml.etree.ElementTree | |
""" | |
Integrate with the Convio / Blackbaud / Luminate CRM API | |
""" | |
def add_crm_user(first_name, last_name, email_address, email_opt_in, city, state, country): | |
API_KEY = "" #See Setup -> Site Options -> Open API Configuration | |
API_USERNAME = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section class="custom-view"> | |
<header> | |
<h1>{{object.model.title}}</h1> | |
<h3>{{object.model.subtitle}}</h3> | |
</header> | |
<main> | |
<nav> | |
<ul> | |
{% for items in object.model.items %} | |
<li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ======================================================================== | |
======= Custom Data Object ================================================ | |
======================================================================== */ | |
var CustomAppData = function(test) { | |
// Call the parent constructor | |
BaseModel.call(this); | |
this.items = []; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Kiosk = function(options, element) { | |
var callbacks = { | |
'data_ready_handler':handle_data_ready, | |
'kiosk_config_data_change_handler':handle_kiosk_config_data_change, | |
'kiosk_data_change_handler':handle_kiosk_data_change | |
} | |
kiosk_connector = new SimpleKioskConnector(options, callbacks) | |
this.states = kiosk_connector.states; | |
this.model = kiosk_connector.model; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import argparse | |
import datetime | |
import io | |
import json | |
import os | |
import sys | |
import urllib | |
import urllib2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lxml.etree | |
import requests | |
import datetime | |
from django.conf import settings | |
from django.core.management.base import BaseCommand, CommandError | |
from django.contrib.sites.models import Site | |
class Command(BaseCommand): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> | |
<CORSRule> | |
<AllowedOrigin>*</AllowedOrigin> | |
<AllowedMethod>GET</AllowedMethod> | |
<MaxAgeSeconds>3000</MaxAgeSeconds> | |
<AllowedHeader>Authorization</AllowedHeader> | |
</CORSRule> | |
<CORSRule> | |
<AllowedOrigin>http://www.domain.com</AllowedOrigin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Inputs: | |
# $1 = cluster | |
# $2 = node | |
# $3 = service | |
# $4 = tags | |
# $5 = uuid | |
# $6 = heartbeat_frequency_seconds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Example Usage: | |
# test.sh 'cluster-id' 'node-id' 'my-fancy-app' 'tag-a,tag-b' 'cluster-id-node-id-my-fancy-app-unit-test-a' 'false' 'Unit Test A is failing because of X' | |
# test.sh 'cluster-id' 'node-id' 'my-fancy-app' 'tag-a,tag-b' 'cluster-id-node-id-my-fancy-app-unit-test-a' 'true' 'Unit Test A is passing' | |
# Example Usage - same service but different UUID tests: | |
# test.sh 'cluster-id' 'node-id' 'nginx' 'tag-a,tag-b' 'cluster-id-node-id-nginx-https-test' 'false' 'HTTPS not working on NGINX' | |
# test.sh 'cluster-id' 'node-id' 'nginx' 'tag-a,tag-b' 'cluster-id-node-id-nginx-port-test' 'false' 'NGINX is not running on port 80' | |
# test.sh 'cluster-id' 'node-id' 'nginx' 'tag-a,tag-b' 'cluster-id-node-id-nginx-memory' 'false' 'NGINX is using too much memory' |
OlderNewer