This file contains 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
from xml.etree import cElementTree as et | |
from django.core.exceptions import ValidationError | |
from django.forms import ImageField | |
class SVGImageField(ImageField): | |
"""A Django ImageField that accepts SVG images.""" | |
def to_python(self, data): | |
""" |
This file contains 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 -e | |
### | |
# Semantic version comparison using semver specification http://semver.org/ | |
# This bash script compares pre-releases alphabetically as well | |
# | |
# returns 1 when A greater than B | |
# returns 0 when A equals B | |
# returns -1 when A lower than B | |
# |
This file contains 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
/** | |
* To apply the theme: | |
* 1) Open dev tools with CTRL + SHIFT + I | |
* 2) Go to the console | |
* 3) Paste the following code | |
* Note: You will have to do this again whenever Github Desktop updates | |
*/ | |
const fs = require('fs'); | |
const path = require('path'); |