Skip to content

Instantly share code, notes, and snippets.

View daniviga's full-sized avatar

Daniele Viganò daniviga

View GitHub Profile
from django.conf import settings
from django.http import HttpResponse
from geonode.layers.views import _resolve_layer, _PERMISSION_MSG_VIEW
import TileStache
import json
def get_config(layer):
if 'datastore' not in settings.DATABASES:
raise Exception()
@ericmagnuson
ericmagnuson / cartodb20_build.sh
Last active April 13, 2017 22:53
How to build CartoDB 2.0 on Ubuntu 12.04
###################################
## CartoDB 2.0 Install [Working] ##
## Tested on Ubuntu 12.04 ##
###################################
# Change password
passwd
adduser [username]
adduser [username] sudo
@larsbutler
larsbutler / cluster_status.py
Created April 4, 2013 11:18
Script for monitoring celery worker usage, for https://github.com/gem/oq-engine
#!/usr/bin/env python
import sys
from celery.task.control import inspect
def ping_celery():
ins = inspect()
# Count the number of total worker processes
total_workers = 0
# ... and active tasks
@aputs
aputs / bootstra-centos6.3.sh
Created January 25, 2013 16:14
bootstrap centos 6.3
#!/bin/sh
#----
# bootstrap centos6
#release=$(cat /etc/fedora-release | awk '/^Fedora/ {print $3}')
#arch=$(arch)
release=6.3
arch=x86_64
ROOTFS=/rootfs/centos$release-$arch
@aputs
aputs / bootstrap-fedora18-sh
Last active December 11, 2015 17:18
bootstrapping fedora 18 for use in LXC
#!/bin/sh
#----
# bootstrap fedora18
#release=$(cat /etc/fedora-release | awk '/^Fedora/ {print $3}')
#arch=$(arch)
release=18
arch=x86_64
ROOTFS=/rootfs/fedora$release-$arch
@hagix9
hagix9 / lxc-centos
Last active March 11, 2024 12:23 — forked from mattwillsher/lxc-centos
LXC CentOS template. Work with Ubuntu if the yum package is installed
#!/bin/bash
#
# template script for generating CentOS container for LXC
#
#
# lxc: linux Container library
# Authors:
@justincjahn
justincjahn / gist:3062860
Created July 6, 2012 21:32
Gitlab init.d for RedHat based distributions.
#!/bin/bash
#
# GitLab Runs unicorn and resque for nginx integration.
###
# chkconfig: 35 82 55
# processname: unicorn
# processname: resque
# description: Runs unicorn and resque for nginx integration.
###
@peo3
peo3 / setup_lxc_rootfs_fedora15.sh
Created August 12, 2011 14:52
How to boot up Fedora 15 with systemd inside Libvirt LXC
#!/bin/sh
# Setup a rootfs of Fedora 15 for libvirt lxc
#
# The rootfs is based on http://download.openvz.org/template/precreated/fedora-15-x86_64.tar.gz
#
# See also
# - http://www.mail-archive.com/lxc-users@lists.sourceforge.net/msg01707/lxc-fedora.in
if [ $# != 1 ]; then