Skip to content

Instantly share code, notes, and snippets.

View EikeDehling's full-sized avatar

Eike Dehling EikeDehling

  • Textkernel
  • Amsterdam
View GitHub Profile
@mojodna
mojodna / README.md
Last active December 20, 2021 14:14
GDAL 2.0 on Amazon Linux
sudo yum -y update
sudo yum-config-manager --enable epel
sudo yum -y install make automake gcc gcc-c++ libcurl-devel proj-devel geos-devel
cd /tmp
curl -L http://download.osgeo.org/gdal/2.0.0/gdal-2.0.0.tar.gz | tar zxf -
cd gdal-2.0.0/
./configure --prefix=/usr/local --without-python
make -j4
sudo make install
@melizeche
melizeche / kick_user.py
Created July 20, 2015 14:23
How to ban/kick a logged in user in django
from django.contrib.sessions.models import Session
from django.contrib.auth.models import User
# grab the user in question
user = User.objects.get(username='johndoe')
[s.delete() for s in Session.objects.all() if s.get_decoded().get('_auth_user_id') == user.id]
user.is_active = False
user.save()