Skip to content

Instantly share code, notes, and snippets.

@redxdev
redxdev / DungeonGenerator.cs
Last active October 4, 2025 18:14
2d Dungeon Layout Generator
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
// NOTE: Some of the classes here (namely the primitives like Vector2d and Rect2d) are not provided,
// but most should be fairly easy to implement yourself or replace with similar
// classes from other libraries.
// The exception is the Delaunay triangulation - that takes quite a bit more effort to implement. That said,
# gunicorn config
CONFIG = {
# 'mode': 'wsgi',
'working_dir': '/usr/lib/python2.7/dist-packages/salt/netapi/rest_cherrypy',
# 'python': '/usr/bin/python',
'args': (
'--bind=0.0.0.0:8000',
'--workers=2',
'--timeout=600',
'--user=root',
@lgellert
lgellert / AutoSlugifyOnSaveModel.py
Last active January 2, 2020 06:43
Django 1.8x + compatible automatic slug creator abstract model
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.db import IntegrityError
from django.template.defaultfilters import slugify
class AutoSlugifyOnSaveModel(models.Model):
"""
@kirbysayshi
kirbysayshi / mass-aggregation-change.sh
Created November 23, 2011 17:14
quick examples of how to change many many wsp (graphite/whisper) files settings
for f in $(find $1 -iname "*.wsp"); do
if [ -a $f ];
then /opt/graphite/bin/whisper-set-aggregation-method.py $f max;
fi;
done