Skip to content

Instantly share code, notes, and snippets.

@eirnym
eirnym / representable_base.py
Last active August 29, 2015 14:18 — forked from exhuma/representable_base.py
this representable base adds generatable __str__ and __repr__
# based on: https://gist.github.com/exhuma/5935162#file-representable_base-py
class RepresentableBase(object):
""" Add automatic __repr__ and __str__ to SQLAlchemy ORM models
"""
def _repr_worker(self, attribute):
mapper = object_mapper(self)
items = [(p.key, getattr(self, p.key))
for p in (
mapper.get_property_by_column(c)
@eirnym
eirnym / AsciidocCheatsheet.adoc
Created March 14, 2021 11:51 — forked from powerman/AsciidocCheatsheet.adoc
Asciidoc cheatsheet for GitHub

Asciidoc cheatsheet for GitHub

@eirnym
eirnym / GitHub Flavored Asciidoc (GFA).adoc
Created March 14, 2021 16:49 — forked from dcode/GitHub Flavored Asciidoc (GFA).adoc
Demo of some useful tips for using Asciidoc on GitHub

GitHub Flavored Asciidoc (GFA)

@eirnym
eirnym / print256colours.sh
Created February 3, 2024 11:12 — forked from HaleTom/print256colours.sh
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256
@eirnym
eirnym / regular_expression_engine_comparison.md
Created February 24, 2025 11:29 — forked from CMCDragonkai/regular_expression_engine_comparison.md
Regular Expression Engine Comparison Chart

Regular Expression Engine Comparison Chart

Many different applications claim to support regular expressions. But what does that even mean?

Well there are lots of different regular expression engines, and they all have different feature sets and different time-space efficiencies.

The information here is just copied from: http://regular-expressions.mobi/refflavors.html