Skip to content

Instantly share code, notes, and snippets.

@DrOctogon
DrOctogon / create_model_instances.py
Created April 15, 2015 17:10
create_model_instances management command This management command is run like this: ./manage.py -a someapp filename.cfg it looks in someapp's directory for a file called /config/filename.cfg with the format explained in the help text, and creates the model instances described in the config file. It uses the configobj module. this would be an exa…
from optparse import make_option
import os
from django.core.management import BaseCommand
import configobj
from django.db.models import get_app, get_model
class Command(BaseCommand):
"""
Creates django models from config files
"""
@DrOctogon
DrOctogon / nginx-uwsgi-web2py-precise
Created October 1, 2015 18:28
bash script setup for nginx-uwsgi-web2py-precise
#!/bin/bash
echo 'setup-web2py-nginx-uwsgi-ubuntu-precise.sh'
echo 'Requires Ubuntu > 12.04 and installs Nginx + uWSGI + Web2py'
# Check if user has root privileges
if [[ $EUID -ne 0 ]]; then
echo "You must run the script as root or using sudo"
exit 1
fi
# Get Web2py Admin Password
echo -e "Web2py Admin Password: \c "
@DrOctogon
DrOctogon / beerslider-use-with-jquery-and-various-start-parameters.markdown
Created March 1, 2019 19:09
BeerSlider - use with jQuery and various start parameters
@DrOctogon
DrOctogon / index.html
Created December 13, 2019 06:48
Text Animation: Montserrat
<svg viewBox="0 0 960 300">
<symbol id="s-text">
<text text-anchor="middle" x="50%" y="80%">Montserrat</text>
</symbol>
<g class = "g-ants">
<use xlink:href="#s-text" class="text-copy"></use>
<use xlink:href="#s-text" class="text-copy"></use>
<use xlink:href="#s-text" class="text-copy"></use>
<use xlink:href="#s-text" class="text-copy"></use>
@DrOctogon
DrOctogon / docker-compose.yml
Created September 5, 2023 20:31 — forked from joekrill/docker-compose.yml
Linkwarden Docker Compose
version: "3.9"
volumes:
postgres:
services:
postgres:
image: postgres
restart: unless-stopped
healthcheck: