Skip to content

Instantly share code, notes, and snippets.

View custom Ranged Integer field for Django
class RangedIntegerField(models.IntegerField):
def __init__(self, min_value=None, max_value=None, **kwargs):
self.min_value = min_value
self.max_value = max_value
if 'validators' in kwargs:
validators = kwargs['validators']
else:
validators = []
if min_value:
@madneon
madneon / gist:7545181
Created November 19, 2013 13:14
HTML: index.html
View gist:7545181
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>...</title>
<meta name="description" content="...">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="author" content="bartek.bobko@gmail.com">
<link rel="shortcut icon" href="favicon.ico">
</head>
@madneon
madneon / build.hxml
Created November 19, 2013 13:12
Haxe: build.hxml - swf parameters
View build.hxml
-main Main
-swf main.swf
-swf-version 11
-swf-header 960:593:60:333355
@madneon
madneon / index.html
Last active December 28, 2015 18:39
Haxe: index.html - simple .swf embed
View index.html
<html>
<head>
<title>SyntaXe</title>
<style>
* {
margin: 0;
padding: 0;
}
</style>
</head>
@madneon
madneon / build.hxml
Created November 19, 2013 12:59
Haxe: build.hxml - interp Main
View build.hxml
-main Main
--interp
@madneon
madneon / Main.hx
Created November 19, 2013 12:59
Haxe: Main.hx
View Main.hx
class Main {
function new() {
}
static function main() {
var main = new Main();
}
}