###SSH into a remote machine###
ssh user@mydomain.com
#or by ip address
ssh user@192.168.1.1
exit: exit
###Install Something###
#If it's a new server, update apt-get first thing
## 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 |
#!/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 |
#!/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 |
#!/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. |
#!/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" | |
''' |
#!/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 |
<!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> |
provinces = [ | |
{ | |
"name": "aceh", | |
"label": "Aceh", | |
"regencies": [ | |
{ | |
"name": "kabupaten-simeulue", | |
"label": "Kabupaten Simeulue" | |
}, | |
{ |
provinces = [ | |
{ | |
"name": "aceh", | |
"label": "Aceh", | |
"regencies": [ | |
{ | |
"name": "kabupaten-simeulue", | |
"label": "Kabupaten Simeulue" | |
}, | |
{ |
###SSH into a remote machine###
ssh user@mydomain.com
#or by ip address
ssh user@192.168.1.1
exit: exit
###Install Something###
#If it's a new server, update apt-get first thing