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...
View GitHub Profile
View hello.esf
f* ?
!? 'hello' |+ 'o'
log ?
log `ES|FOO`
langri-sha /
Created Jul 21, 2016
Identity verification

Keybase proof

I hereby claim:

  • I am langri-sha on github.
  • I am 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:

langri-sha /
Last active Sep 16, 2016
Settings for creating a default Virtualbox Docker machine
docker-machine create \
--driver virtualbox \
--virtualbox-memory 2048 \
--engine-opt dns= \
--engine-opt log-driver=none \
--virtualbox-cpu-count 2 \
langri-sha /
Created Jan 11, 2016
NTFS undelete session highlights
# 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
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
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
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: test [options] [appname ...]
Runs the test suite for the specified applications, or the entire site if no apps are specified.
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
langri-sha /
Created Feb 9, 2011
Class-based django-registration view
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 /
Created Nov 30, 2010 — forked from rainerborene/
Django email auth backend via @rainerborene
# 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):
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
You can’t perform that action at this time.