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
edxapp@edx:~/edx-platform$ ./manage.py lms shell --settings=devstack | |
Python 2.7.3 (default, Sep 26 2013, 20:03:06) | |
Type "copyright", "credits" or "license" for more information. | |
IPython 0.13.1 -- An enhanced Interactive Python. | |
? -> Introduction and overview of IPython's features. | |
%quickref -> Quick reference. | |
help -> Python's own help system. | |
object? -> Details about 'object', use 'object??' for extra details. |
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
"FEATURES": { | |
"USE_MICROSITES": true | |
}, | |
"MICROSITE_CONFIGURATION": { | |
"mineduc": { | |
"domain_prefix": "mineduc", | |
"university": "mineduc-forma", | |
"platform_name": "FormaX", | |
"logo_image_url": "mineduc/images/header-logo.png", | |
"email_from_address": "info@formax.edu.ec", |
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
mysql> select * from mentoring_answer ORDER BY id DESC LIMIT 1; | |
+-----+------+----------------------------------+---------------+---------------------+---------------------+---------------------------+ | |
| id | name | student_id | student_input | created_on | modified_on | course_id | | |
+-----+------+----------------------------------+---------------+---------------------+---------------------+---------------------------+ | |
| 285 | goal | 949b5f1c92d026420c75a83a8021a78a | fdsgsdg | 2014-10-14 19:06:41 | 2014-10-14 19:06:44 | slashes:Asses+A10+2014_A1 | | |
+-----+------+----------------------------------+---------------+---------------------+---------------------+---------------------------+ | |
1 row in set (0.00 sec) | |
mysql> Bye |
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
sudo fallocate -l 4G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab | |
sudo sysctl -w vm.swappiness=10 | |
sudo echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf |
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
[default] | |
access_key = asf | |
bucket_location = US | |
cloudfront_host = cloudfront.amazonaws.com | |
cloudfront_resource = /2010-07-15/distribution | |
default_mime_type = binary/octet-stream | |
delete_removed = False | |
dry_run = False | |
encoding = UTF-8 | |
encrypt = False |
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 os |
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
{ | |
// Your GitHub API token | |
// see: https://github.com/condemil/Gist#generating-access-token | |
"token": "b325b9d4af450496dfd6fbf338fe7a8bf5201da3", | |
// Show GitHub organizations | |
// Example: "company1", "company2" | |
"include_orgs": [], | |
// Show GitHub users |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" > | |
<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet"> | |
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script> | |
<script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script> | |
</head> |
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 xmlrpc.server import SimpleXMLRPCServer | |
class KeyValueServer: | |
_rpc_methods_ = ['get', 'set', 'delete', 'exists', 'keys'] | |
def __init__(self, address): | |
self._data = {} | |
self._serv = SimpleXMLRPCServer(address, allow_none=True) | |
for name in self._rpc_methods_: | |
self._serv.register_function(getattr(self, name)) |
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 the default template for our main set of AWS servers. This does NOT | |
cover the content machines, which use content.py | |
Common traits: | |
* Use memcached, and cache-backed sessions | |
* Use a MySQL 5.1 database | |
""" | |
# We intentionally define lots of variables that aren't used, and |