Skip to content

Instantly share code, notes, and snippets.

@htuscher
htuscher / .gitlab-ci.yml
Created August 3, 2017 08:12
Deploying with docker-compose via SSH tunnel in Gitlab CI
deploy:live:
image: 1drop/docker:git
stage: deploy
when: manual
environment:
name: production
url: https://www.somecustomer.de
before_script:
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
@mgd020
mgd020 / render_streamfield.py
Last active October 25, 2016 05:34
Registers render_streamfield tag to add current context to streamfield block templates.
'''
Registers render_streamfield tag to add current page context to all block templates.
Usage: {% render_streamfield a_streamfield %}
Author: github.com/mgd020
'''
from django import template
from wagtail.wagtailcore.blocks.base import Block
@gingerlime
gingerlime / change_db_owner.sh
Created April 24, 2012 19:32
Postgresql - Changing ownership on all tables
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
This script set ownership for all table, sequence and views for a given database
Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto