This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import curses | |
from random import choice | |
class TetrisGame: | |
"""Tetris Game - class-based version. """ | |
pieces = [ | |
[(0, 0), (0, -1), (0, 1), (1, 1)], | |
[(0, 0), (0, -1), (0, 1), (-1, 1)], | |
[(0, 0), (0, -1), (1, -1), (1, 0)], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import template | |
from django.http import QueryDict | |
from django.utils.safestring import mark_safe | |
from django.template.loader import get_template | |
register = template.Library() | |
class QueryStringNode(template.Node): | |
def __init__(self, to_add, to_remove): | |
self.to_add = to_add |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# geoip-update.sh -- update geoip lite database(s). | |
# author: massimo.scamarcia@gmail.com | |
#prg="wget --quiet" | |
prg="wget" | |
download_path="/usr/share/GeoIP/download" | |
geolite_path="/usr/share/GeoIP" |