Skip to content

Instantly share code, notes, and snippets.

View niktto's full-sized avatar

Marek Szwałkiewicz niktto

View GitHub Profile
#!/bin/bash
if [ $ARGUMENT ]; then
if [[ $ARGUMENT =~ .+\.[jpg|JPG] ]]
then
killall eog
eog "$ARGUMENT" -f &
fi
fi
@niktto
niktto / models.py
Created August 6, 2015 09:27
Using Django Rest Framework to ease csv generation
from django.db import models
class SomeModel(models.Model):
email = models.EmailField()
first_name = models.CharField(max_length=50)
last_name = models.CharField(max_length=50)
RACES = [
'Dragonborn',
'Dwarf',
'Elf',
'Gnome',
'Half-Elf',
'Halfling',
'Half-Orc',
'Human',
'Tiefling',