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 functools import wraps | |
from fabric import tasks | |
def fix_boolean(f): | |
true_values = ("yes", "true", "1") | |
false_values = ("no", "false", "0") | |
def fix_bool(value): | |
if isinstance(value, basestring): |
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
upstream plex-upstream { | |
# change plex-server.example.com:32400 to the hostname:port of your plex server. | |
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx. | |
server plex-server.example.com:32400; | |
} | |
server { | |
listen 80; | |
# server names for this server. |
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
@echo off | |
set OUTDIR=%~d1%~p1%~n1 | |
set FILE=%~nx1 | |
set EXT=%~x1 | |
echo InstallShield Extractor (inspired by http://stackoverflow.com/questions/8681252/programmatically-extract-contents-of-installshield-setup-exe) | |
echo Current Directory is %cd% | |
echo %EXT% | |
if "%EXT%"==".msi" ( goto :msi ) | |
if not "%EXT%"==".exe" ( goto :unsupported ) |
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 django.core.urlresolvers import reverse | |
from django.core.exceptions import MultipleObjectsReturned | |
from django.utils.safestring import mark_safe | |
def add_link_field(target_model=None, field='', app='', field_name='link', | |
link_text=unicode, short_description=None): | |
""" | |
decorator that automatically links to a model instance in the admin; | |
inspired by http://stackoverflow.com/questions/9919780/how-do-i-add-a-link-from-the-django-admin-page-of-one-object- | |
to-the-admin-page-o |