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
    
  
  
    
  | description "launch django app with gunicorn and new relic monitoring" | |
| start on net-device-up | |
| stop on shutdown | |
| respawn | |
| # this cd's into your app's base dir | |
| chdir /var/www/<appname>/ | |
| # this sets the path to your newrelic.ini file | 
  
    
      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
    
  
  
    
  | from django.core.cache import cache | |
| cache.clear() | 
  
    
      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
    
  
  
    
  | //via: http://www.catswhocode.com/blog/mastering-the-html5-audio-property | |
| <audio id="player" src="http://www.sounddogs.com/sound-effects/104/mp3/490284_SOUNDDOGS__ch.mp3"></audio> | |
| <a onclick="document.getElementById('player').play()" >Cheer</a> | 
  
    
      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
    
  
  
    
  | # from : http://stackoverflow.com/questions/785519/how-do-i-remove-all-pyc-files-from-a-project | |
| http://stackoverflow.com/questions/785519/how-do-i-remove-all-pyc-files-from-a-project | 
  
    
      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
    
  
  
    
  | /* | |
| /* CSS */ | |
| .expose{ | |
| position:'relative'; | |
| background-color:'#fff'; | |
| z-index:1050; | |
| } | |
| */ | |
| function expose(el) { | |
| el.addClass("exposed"); | 
  
    
      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 pyrax | |
| RACK_USER = "..." | |
| RACK_API_KEY = "..." | |
| pyrax.set_setting("identity_type", "rackspace") | |
| pyrax.set_credentials(RACK_USER, RACK_API_KEY, region="LON" ) | |
  
    
      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
    
  
  
    
  | from haystack.forms import FacetedSearchForm | |
| class ShowResultsSearchForm(FacetedSearchForm): | |
| """ | |
| This example extends the FacetedSearchForm - you could just as easily extend SearchForm | |
| """ | |
| def __init__(self, *args, **kwargs): | |
| super(BrowseFilterSearchForm, self).__init__(*args, **kwargs) | 
  
    
      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 | |
| url = "http://bulksms.2way.co.za:5567/eapi/submission/send_sms/2/2.0" | |
| phone_number = 27123456678 | |
| data = {'username' : 'xxxx', 'password' : 'xxxx', 'message' : 'Testing SMS', 'msisdn' : phone_number} | |
| response = requests.post(url,data) | 
  
    
      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
    
  
  
    
  | from django.contrib.sites.models import Site | |
| import uuid | |
| def upload_to(instance, filename): | |
| current_site = Site.objects.get_current() | |
| extension = filename.split(".")[-1] | |
| instance_slug = getattr(instance,"slug",False) | |
| if not instance_slug: | 
  
    
      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
    
  
  
    
  | - name: print to stdout | |
| command: echo "hello" | |
| register: hello | |
| - debug: msg="{{ hello.stdout }}" | |
| - debug: msg="{{ hello.stderr }}" |