Skip to content

Instantly share code, notes, and snippets.

View katjakarhu's full-sized avatar

Katja Karhu katjakarhu

  • Helsinki, Finland
View GitHub Profile
@nedludd0
nedludd0 / borg_sqlalchemy.py
Last active May 19, 2025 15:27
Sql Raw on SqlAlchemy Engine with pool connections (Python Pattern Borg Singleton)
"""
SINGLETON CLASS ENCAPSULATING A SQLALCHEMY ENGINE and SESSION.
Credit: https://gist.github.com/skeeved/79dfe5652b20182586bb55c3cbc94250
"""
""" Config """
from os import environ
DB_TYPE = environ.get('DB_TYPE') # Example: mysql
DB_CONNECTOR = environ.get('DB_CONNECTOR') # Example: pymysql
DB_HOST = environ.get('DB_HOST')
@ghickman
ghickman / add_inline.js
Created June 11, 2011 11:19
Add an inline Django form to the formset without reloading the page.
function add_inline_form(prefix) {
var count = parseInt($('#id_' + prefix + '-TOTAL_FORMS').val(), 10);
var last_form = $('.' + prefix + ':last');
var new_form = last_form.clone(false).html(last_form.html().replace(
new RegExp(prefix + '-\\\\d-', 'g'), prefix + '-' + count + '-'));
new_form.find('input[type="text"], textarea').each(function () {
$(this).val('');
});
new_form.hide().insertAfter(last_form).slideDown(300);
@bebraw
bebraw / gameengines.md
Created January 6, 2011 18:07
List of JS game engines. You can find a wikified version at https://github.com/bebraw/jswiki/wiki/Game-Engines. Feel free to modify that. I sync it here every once in a while.

IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version. There's also a "notes" column in the table but it simply does not fit there... Check out the raw version to see it.

This table contains primarily HTML5 based game engines and frameworks. You might also want to check out the [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]] and [[Scene Graphs]].

Name Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
AllBinary Platform Platform Dependent AllBinary 2D/2.5D/3D n