Skip to content

Instantly share code, notes, and snippets.

😪
Three, one, four, one, z, z, z...

Filip Dupanović langri-sha

😪
Three, one, four, one, z, z, z...
Block or report user

Report or block langri-sha

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:379809
======================================================
Setting up Django using Apache/mod_wsgi on Ubuntu 8.10
======================================================
This article will cover setting up Django using Apache/mod_wsgi on Ubuntu
8.10. The article is targeted at a production environment, but keep in mind
this is a more generalized environment. You may have different requirements,
but this article should at least provide the stepping stones.
The article will use distribution packages where nesscary. As of 8.10 the
@langri-sha
langri-sha / backends.py
Created Nov 30, 2010 — forked from rainerborene/backends.py
Django email auth backend via @rainerborene
View backends.py
#===============================================================================
# Django email auth backend
#===============================================================================
from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
class EmailBackend(ModelBackend):
def authenticate(self, **credentials):
@langri-sha
langri-sha / registration_view.py
Created Feb 9, 2011
Class-based django-registration view
View registration_view.py
from django.views.generic.edit import FormView
from django.views.generic.base import RedirectView
from registration.models import RegistrationProfile
from forms import RegistrationForm
class AccountRegistrationView(FormView):
template_name = 'authentication/registration_form.html'
form_class = RegistrationForm
@langri-sha
langri-sha / manage-help-test-out.txt
Created May 4, 2012
Output for `manage help test` for the overridden `test` management command
View manage-help-test-out.txt
Usage: manage.py test [options] [appname ...]
Runs the test suite for the specified applications, or the entire site if no apps are specified.
Options:
-v VERBOSITY, --verbosity=VERBOSITY
Verbosity level; 0=minimal output, 1=normal output,
2=verbose output, 3=very verbose output
--settings=SETTINGS The Python path to a settings module, e.g.
"myproject.settings.main". If this isn't provided, the
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@langri-sha
langri-sha / ntfsundelete.sh
Created Jan 11, 2016
NTFS undelete session highlights
View ntfsundelete.sh
# List deleted files from the MFT, sort by date
sudo ntfsundelete /dev/sdb1 | sort -n -r -k4 | \
# Construct commands to undelete each INODE to ~${date}/${inode}-{filename}
awk '{print "sudo ntfsundelete -u /dev/sdb1 -i " $1 " -o \"/run/media/fdupanovic/WD/" $4 "/" $1 "-" $7 "\"";}' | \
# Truncate day from dates
sed -r "s/-[0-9]+//2" | \
# Split into files with 2048 commands each to avoid memory segmentation errors
@langri-sha
langri-sha / docker-machine-virtualbox-create.sh
Last active Sep 16, 2016
Settings for creating a default Virtualbox Docker machine
View docker-machine-virtualbox-create.sh
docker-machine create \
--driver virtualbox \
--virtualbox-memory 2048 \
--engine-opt dns=8.8.8.8 \
--engine-opt log-driver=none \
--virtualbox-cpu-count 2 \
default
@langri-sha
langri-sha / keybase.md
Created Jul 21, 2016
Identity verification
View keybase.md

Keybase proof

I hereby claim:

  • I am langri-sha on github.
  • I am langrisha (https://keybase.io/langrisha) on keybase.
  • I have a public key whose fingerprint is 6E69 8B1D 695A D804 9BDD 2A04 BF65 B517 C7E5 00E4

To claim this, I am signing this object:

View hello.esf
.
|
f* ?
!? 'hello' |+ 'o'
log ?
|
.
|<
log `ES|FOO`
You can’t perform that action at this time.