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
/* ======================================================================== | |
======= 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
<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
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
from bs4 import BeautifulSoup | |
import os | |
import re | |
import requests | |
import urlparse | |
import smtplib | |
from smtplib import SMTP | |
from smtplib import SMTP_SSL | |
from smtplib import SMTPAuthenticationError |
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
#1. Remove the current version and clear app cache | |
sudo apt-get remove salt-minion | |
sudo apt-get clean | |
apt-get autoremove | |
#2. Create script to view all PPAs: | |
#Save as script as listppa.sh: | |
#! /bin/sh | |
# Script to get all the PPA installed on a system |
OlderNewer