from django.http import HttpResponse
from .utils import queryset_to_workbook
def download_workbook(request):
queryset = User.objects.all()
columns = (
'first_name',
'last_name',
'email',
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.mcheckbox-container { | |
display: inline-block; | |
vertical-align: middle; | |
height: 160px; | |
overflow: auto; | |
} | |
.mcheckbox-table { | |
margin-right: 20px; | |
width: 100%; | |
} |
In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:
git remote add upstream https://github.com/whoever/whatever.git
git fetch upstream
This gist contains a list of tricks, commands and formula I collected while working with Open Refine.
See this blogpost: Merging Datasets with Common Columns in Google Refine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'socket' | |
hostname = ARGV[0] | |
port = ARGV[1] | |
filename = ARGV[2] | |
begin | |
socket = TCPSocket.new( hostname, port ) | |
socket.send( "zINSTREAM\0", 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create ftp user, create folders and set permissions | |
# Shamelessly coppied from http://dev.n0ise.net/2012/09/vsftpd-add-user-automation-bash-script/ | |
# Usage: ./create_ftp_user.sh [username] "[password]" | |
# | |
NAME=$1 | |
PASS=$2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <tunables/global> | |
profile docker-default flags=(attach_disconnected,mediate_deleted) { | |
#include <abstractions/base> | |
network, | |
capability, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
option=$1 | |
geonodeBackup='/home/geonode_backups' | |
mkdir $geonodeBackup | |
date=$(date +%Y-%m-%d-%H) | |
function stopServices | |
{ | |
echo "Stopping services" | |
sudo service apache2 stop |