Skip to content

Instantly share code, notes, and snippets.

View aborgert's full-sized avatar

Alexander Borgert aborgert

View GitHub Profile
{% for post in posts %}
<h2>{{ post.title }}</h2>
<p>
{{ post.excerpt }}
</p>
{% endfor %}
/// @description get name, add highscore, then go back to menu. Requires 'input' variable in object.
if (keyboard_lastkey == vk_backspace) {
input_text = string_delete(input_text,
string_length(input_text) -1, 1);
} else if (keyboard_lastkey == vk_enter) {
if (string_length(input_text) > 0) {
highscore_add(input_text, o_game_controller.total_score);
room_goto(r_menu);
}
o_game_controller.game_surface = sprite_create_from_surface(
application_surface,
0,0,
view_wport[0], view_hport[0],
0, 0, 0, 0);
@aborgert
aborgert / gist:2066306
Created March 17, 2012 23:10 — forked from pithyless/gist:1208841
Install Python 2.7 (homebrew + pip + virtualenv) on Mac OS X Lion

Install Python

$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7

Symlinks...

@aborgert
aborgert / twistedeventloop.py
Created March 24, 2010 11:20
TwistedEventLoop Example
"""
This is an example of how to integrate urwid with Twisted by using
urwid.TwistedEventLoop. It is nothing fancy, and error checking is severly
lacking but it gets the job done to demonstrate how it works.
Author: Alexander Borgerth (sobber)
alex.borgert@gmail.com
PS: Requires urwid 0.9.9.1 from wardi's github repository, with commit
'84dba9430ac0f5d842897d0d7fbe36df2c06a5a7' which fixes urwid.TwistedEventLoop()