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
#!/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 |
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
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
# 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
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
#!/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
#!/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 |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
elem.clientLeft
,elem.clientTop
,elem.clientWidth
,elem.clientHeight
elem.getClientRects()
,elem.getBoundingClientRect()
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 pyVmomi | |
import argparse | |
import atexit | |
import itertools | |
from pyVmomi import vim, vmodl | |
from pyVim.connect import SmartConnect, Disconnect | |
import humanize |
OlderNewer