Skip to content

Instantly share code, notes, and snippets.

View dfeeney's full-sized avatar

David Feeney dfeeney

View GitHub Profile
@dfeeney
dfeeney / gist:6380023
Created August 29, 2013 16:02
Script to import exhibits from viewshare.org. Just change username, and slug to local target values, and source_url to the exhibit to import
#!/usr/bin/env python
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "viewshare.settings")
from freemix.exhibit import models
import json, urllib2, uuid
from django.contrib.auth.models import User
from freemix.exhibit.serializers import ExhibitPropertyListSerializer
@dfeeney
dfeeney / akara.conf
Created March 4, 2013 22:45
Local Freemix akara setup script Just run 'sh setup.sh'. It will create a virtualenv, configure akara and start an instance running on port 8882. Then add the following to local_settings.py in your viewshare instance: AKARA_URL_PREFIX = 'http://localhost:8882'
# -*- mode: python -*-
# This is the main Akara server configuration file. It contains
# settings for the server and for its extension modules.
# The configuration file is written in Python. Configuration data goes
# into class attributes. If the module is "A.B.C" then the
# configuration information should be in the class named "C". If there
# is a conflict then use the parameter "akara_name" to set the full
# module name.
@dfeeney
dfeeney / gist:3947438
Created October 24, 2012 17:18
Viewshare server chef role
{
"env_run_lists": {
},
"default_attributes": {
"memcached": {
"listen": "127.0.0.1"
}
},
"description": "",
"name": "viewshare_server",
@dfeeney
dfeeney / forms.html
Created July 8, 2011 22:33
Ajax/django auth post tests
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="http://github.com/malsup/form/raw/master/jquery.form.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#ajaxformpost").ajaxForm({
target: "#ajaxformresult",
error: function(data) {
$("#rawpostresult").empty();
@dfeeney
dfeeney / settings.py
Created March 28, 2011 03:30
Working django-cms settings with django 1.3 staticfiles
# -*- coding: utf-8 -*-
import os
gettext = lambda s: s
PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG