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
## mako | |
<%namespace name='static' file='static_content.html'/> | |
<%namespace file='main.html' import="login_query, stanford_theme_enabled"/> | |
<%! | |
from django.core.urlresolvers import reverse | |
from django.utils.translation import ugettext as _ | |
from microsite_configuration import microsite | |
from microsite_configuration.templatetags.microsite import platform_name | |
from ccx.overrides import get_current_ccx |
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/bash | |
#move to folder themes | |
cd /edx/app/edxapp/themes/<change-to-your-theme>/ | |
echo "inside /edx/app/edxapp/themes/<change-to-your-theme>/" | |
#switch to user edxapp | |
sudo -H -u edxapp bash << EOF | |
echo "Now as: " | |
whoami |
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/bash | |
# check the celery status | |
sudo tail -f /edx/var/log/{lms,cms,nginx}/*log | grep celery | |
# create the same celery account that used in lms.auth.json & cms.auth.json | |
sudo rabbitmqctl add_user celery celery | |
sudo rabbitmqctl set_permissions celery ".*" ".*" ".*" | |
# restart the service |
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/env python | |
import webbrowser | |
import time | |
# Video 'Are You Drinking Enough Water?' | |
url = 'https://www.youtube.com/watch?v=QMi3xA-5KbE' | |
start_count = 0 | |
total_count = 8 | |
# 2 Hours |
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 | |
# Program for remove number from file names in targeted folder | |
import os | |
# Set target directory where the files resides | |
target_dir = r"/your/path/to/folder/here" | |
''' | |
r stands for rawpack. it means to tell python take this string as it is. |
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 | |
# Program for prefix and suffix number in file names in targeted folder | |
import os | |
import random | |
# Set target directory where the files resides | |
target_dir = r"/Users/darthmako/Documents/playground/udacity-python-foundation/secret-messages" | |
''' |
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/bash | |
# switch to user edxapp to update assets | |
sudo -H -u edxapp bash << EOF | |
source /edx/app/edxapp/edxapp_env | |
cd /edx/app/edxapp/edx-platform | |
paver update_assets lms --settings=aws --debug | |
EOF | |
# restart the lms instance |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>IndonesiaX</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<style>@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400);</style> | |
</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
provinces = [ | |
{ | |
"name": "aceh", | |
"label": "Aceh", | |
"regencies": [ | |
{ | |
"name": "kabupaten-simeulue", | |
"label": "Kabupaten Simeulue" | |
}, | |
{ |
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
provinces = [ | |
{ | |
"name": "aceh", | |
"label": "Aceh", | |
"regencies": [ | |
{ | |
"name": "kabupaten-simeulue", | |
"label": "Kabupaten Simeulue" | |
}, | |
{ |
OlderNewer