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 hidden or 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 | |
# This hook is sourced after every virtualenv is activated. | |
PS1="$_OLD_VIRTUAL_PS1" | |
PROJECT_DIR="$HOME/Documents/Development/virtualenvs/$(basename $VIRTUAL_ENV)" | |
if [ -d $PROJECT_DIR ]; then | |
# If we aren't already within the project dir, cd into it | |
if [[ ! `pwd` == "$PROJECT_DIR*" ]]; then | |
export PRE_VENV_ACTIVATE_DIR=`pwd` | |
cd "$PROJECT_DIR" |
This file contains hidden or 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
export WORKON_HOME=~/Documents/Development/virtualenvs | |
source /usr/local/bin/virtualenvwrapper.sh |
This file contains hidden or 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 requests | |
from io import BytesIO | |
def genCatImage(): | |
""" | |
generates an image from TheCatAPI and returns the image as a Byte stream | |
""" | |
# get image from website | |
r = requests.get('http://thecatapi.com/api/images/get?format=src&type=png') | |
if r.status_code == requests.codes.ok: # image returned OK |
This file contains hidden or 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 FBSDKShareKit | |
... | |
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool { | |
return FBSDKApplicationDelegate.sharedInstance().application( | |
application, | |
openURL: url, | |
sourceApplication: sourceApplication, | |
annotation: annotation) |