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/sh -x ## or just ` curl -Ls http://git.io/vRozn | sh `. | |
## Downloads the Mac OS X 10.10 Recovery Partition update, | |
## Copy's over the 10.10 version of Disk Utility.app, then | |
## use git to apply a binary patch so it will run on 10.11+. | |
cd /tmp | |
rm -rf DU1010 | |
mkdir DU1010 |
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
LDAP_SERVER = "ldaps://my-ldap-server.com/" | |
LDAP_BASE = "dc=my-ldap-server,dc=com" | |
def users_ldap_groups(uid): | |
""" Returns a list of the groups that the uid is a member of. | |
Returns False if it can't find the uid or throws an exception. | |
It's up to the caller to ensure that the UID they're using exists! | |
""" | |
logger.debug("uid: ", uid) |
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
# things I keep forgetting to do in new Django projects. | |
import os | |
# put settings common to all environment in a file called base.py: | |
from .base import * | |
# example here: https://github.com/twoscoops/django-twoscoops-project/tree/develop/project_name/project_name/settings | |
########## PATH CONFIGURATION | |
# sets the root of the project, useful for setting relative paths: | |
SITE_ROOT = os.path.realpath(os.path.dirname(__file__) + "/../") |