Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
####################
# CKAN installation script
# based on http://docs.ckan.org/en/master/install-from-source.html
####################
# @TODO Get these values as flags
dbpassword='abcde12345'
readonlydbpassword='abcde12345'
@wrought
wrought / backup.sh
Last active December 12, 2015 04:09
Localwiki backup script based on https://guide.localwiki.org/Backup
#!/bin/bash
timestamp=`date -u +%Y-%m-%d_%H-%M-%S`
tempdir=~/backups/localwiki-backup-$timestamp
# set stage
mkdir $tempdir -p # make (-p) parent directories as needed
# do the dirty work
cp -r /usr/share/localwiki/ $tempdir/usr.share.localwiki/
@wrought
wrought / models.py
Created December 3, 2012 09:52
django models implementing portion of hackerspaces space api
from django.db import models
class Status(models.Model):
open = models.BooleanField()
status = models.CharField(max_length=None)
lastchange = models.DateTimeField() # needs to be longint
class Events(models.Model): # example is "fire-alarm"
status = models.ForeignKey('Status')
name = models.CharField(max_length=None)