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 | |
# | |
# nginx - this script starts and stops the nginx daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
# proxy and IMAP/POP3 proxy server | |
# processname: nginx | |
# config: /etc/nginx/nginx.conf | |
# config: /etc/sysconfig/nginx |
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
{ | |
"settings": { | |
"index": { | |
"number_of_shards": 10, | |
"number_of_replicas": 1, | |
"analysis": { | |
"analyzer": { | |
"default": { | |
"type": "standard", | |
"tokenizer": "standard", |
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
[2013-10-10 22:49:44,506][INFO ][request_json ] {"time":"2013-10-10T22:49:44.396Z","starttime":"2013-10-10T22:49:26.791Z","localaddr":"127.0.0.1","localport":9200,"remoteaddr":"127.0.0.1","remoteport":53360,"scheme":"http","method":"DELETE","path":"/reliant_268_capistrano","querystr":"-","code":200,"status":"OK","size":31,"duration":17605,"year":"2013","month":"10","day":"10","hour":"22","minute":"49","dow":"Thu","cluster":"data_search_dev"} | |
[2013-10-10 22:51:39,548][INFO ][request ] [dev-search] POST /reliant_268_capistrano/_import target=%2Ftmp%2Felasticsearch_deployment%2Freliant_268&timeout=1m 200 OK 11 36 | |
[2013-10-10 22:51:39,549][INFO ][request_json ] {"time":"2013-10-10T22:51:39.548Z","starttime":"2013-10-10T22:51:39.512Z","localaddr":"127.0.0.1","localport":9200,"remoteaddr":"127.0.0.1","remoteport":53371,"scheme":"http","method":"POST","path":"/reliant_268_capistrano/_import","querystr":"target=%2Ftmp%2Felasticsearch_deployment%2Freliant_268&timeout=1m","code" |
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
# Set Salt master | |
minion: | |
master: eng-salt-master.example.com | |
providers: | |
ec2: | |
provider: ec2 | |
ssh_username: ec2-user | |
ssh_interface: private_ips |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
// GET /api/edx.core/courses/edX+Open_DemoX+edx_demo_course | |
{ | |
"course_id": "edX+Open_DemoX+edx_demo_course", | |
"name": "edX Demonstration Course", | |
"_links": { | |
"self": { "href": "/api/edx.core/courses/edX+Open_DemoX+edx_demo_course" }, | |
"curies": [ | |
{ "name": "edx.analytics", "href": "https://analytics-api.edx.org/docs/rels/{rel}", "templated": true }, | |
{ "name": "edx.content", "href": "https://api.edx.org/api/edx.content/docs/rels/{rel}", "templated": true }, | |
{ "name": "edx.videos", "href": "https://api.edx.org/api/edx.video/docs/rels/{rel}", "templated": true } |
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
""" | |
This file contains Django authentication backends. For more information visit | |
https://docs.djangoproject.com/en/dev/topics/auth/customizing/. | |
""" | |
from calendar import timegm | |
from datetime import datetime | |
from django.conf import settings | |
import jwt | |
from social.backends.oauth import BaseOAuth2 |
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
""" | |
Workflow: | |
1. User authenticates and OIDC provider returns permissions as comma-delimited list of globs. | |
2. When user access a course page, call has_access() to verify permissions. | |
If no permissions, view should raise a 403 error. This can be accomplished with a mixin added to our existing views. | |
""" | |
# models.py | |
class UserCoursePermissons(models.Model): | |
user = models.ForeignKey(User, primary_key=True) # Unsure if foreign key can also be primary key |
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
# Get the courses from modulestore | |
from xmodule.modulestore.django import modulestore | |
courses = modulestore().get_courses() | |
# Loop through the ids and print the IDs and types | |
for course in courses: | |
print "{}, {}".format(course.id, type(course.id)) |
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
""" | |
This is a basic script to issue a credit via the CyberSource API. | |
Requirements: | |
suds (https://fedorahosted.org/suds/) [Install via pip] | |
References | |
* http://www.cybersource.com/developers/integration_methods/simple_order_and_soap_toolkit_api/soap_api/SOAP_toolkits.pdf | |
* http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SO_API/Credit_Cards_SO_API.pdf | |
* http://pydoc.net/Python/merchant-gateways/0.0.1/merchant_gateways.billing.gateways.cybersource/ |
OlderNewer