GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.
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 | |
# stolen from http://stackoverflow.com/questions/27590039/running-ansible-playbook-using-python-api | |
import os | |
import sys | |
from collections import namedtuple | |
from ansible.parsing.dataloader import DataLoader | |
from ansible.vars import VariableManager | |
from ansible.inventory import Inventory |
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 socket #for sockets | |
import sys #for exit | |
try: | |
#create an AF_INET, STREAM socket (TCP) | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
except socket.error, msg: | |
print 'Failed to create socket. Error code: ' + str(msg[0]) + ' , Error message : ' + msg[1] |
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
huatang_DAK = xxx | |
huatang_DAS = xxx | |
def get_dat(dak, das): | |
""" | |
Domain access token | |
GET | |
/v1.3/domains/accessTokens{?key,domain_api_secret} | |
""" | |
url = api_host + '/v1.3/domains/accessTokens?key={0}&domain_api_secret={1}'.format(dak, das) |
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
# variables common to the lms role, automatically loaded | |
# when the role is included | |
--- | |
# These are variables that default to a localhost | |
# setup and are meant to be overwritten for | |
# different environments. | |
# | |
# Variables in all caps are environment specific | |
# Lowercase variables are internal to the role |
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 fabric.api import local, run, env, put | |
import os, time | |
# remote ssh credentials | |
env.hosts = ['10.1.1.25'] | |
env.user = 'deploy' | |
env.password = 'XXXXXXXX' #ssh password for user | |
# or, specify path to server public key here: | |
# env.key_filename = '' |
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 | |
# coding=utf-8 | |
import json | |
from torndsession.sessionhandler import SessionBaseHandler | |
from db import DataBase | |
class PushHandler(SessionBaseHandler): | |
def post(self): |
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 | |
echo "Patching Microsoft Office Outlook..." | |
sudo perl -i.bak -pe 's|\x00\x0F\xA3\xCA\x72\x02\x31\xC0|\x00\x0F\xA3\xCA\x72\x02\x90\x90|' /Applications/Microsoft\ Outlook.app/Contents/Frameworks/MicrosoftSetupUI.framework/Versions/Current/MicrosoftSetupUI | |
sudo codesign -f -s - /Applications/Microsoft\ Outlook.app/Contents/Frameworks/MicrosoftSetupUI.framework | |
echo "Patching Microsoft Office Word..." | |
sudo perl -i.bak -pe 's|\x00\x0F\xA3\xCA\x72\x02\x31\xC0|\x00\x0F\xA3\xCA\x72\x02\x90\x90|' /Applications/Microsoft\ Word.app/Contents/Frameworks/MicrosoftSetupUI.framework/Versions/Current/MicrosoftSetupUI | |
sudo codesign -f -s - /Applications/Microsoft\ Word.app/Contents/Frameworks/MicrosoftSetupUI.framework |
NewerOlder