Skip to content

Instantly share code, notes, and snippets.

View ObserverOfTime's full-sized avatar

ObserverOfTime

View GitHub Profile
@ObserverOfTime
ObserverOfTime / svgimagefield.py
Last active October 28, 2020 16:55 — forked from ambivalentno/svgimagefield.py
A form field to handle validation of image + svg.
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):
"""
#!/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
#
@ObserverOfTime
ObserverOfTime / css-inject.js
Last active March 3, 2024 04:46 — forked from 1j01/README.md
GitHub Desktop Dark Theme - NO LONGER MAINTAINED
/**
* 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');