View tiled.py
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
#!/usr/bin/env python3 | |
import os | |
import sys | |
import json | |
import struct | |
import base64 | |
import io | |
from urllib.parse import urlparse | |
import itertools | |
from functools import partial |
View Main.elm
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
port module Main exposing (..) | |
import Html exposing (program, div, button, text, Html, Attribute) | |
import Html.Events as Events | |
import Html.Attributes as Attributes | |
import Dict exposing (Dict) | |
import Json.Decode as Json | |
baseUrl = |
View bitfont.py
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
# -*- coding: utf-8 -*- | |
# Convert a Bitfontmaker JSON into PNG (requires Pillow library) | |
# | |
# See gallery: | |
# http://www.pentacom.jp/pentacom/bitfontmaker2/gallery/ | |
# | |
# Usage: | |
# python bitfont.py font.json font.png |
View SpriteSheet.elm
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
module SpriteSheet exposing (..) | |
import Math.Vector2 exposing (Vec2, vec2) | |
import WebGL exposing (Texture, Shader) | |
{-| | |
Render a portion of a sprite sheet. | |
-} | |
fragmentSpriteSheet : Shader {} { u | spriteSheet : Texture, spriteSheetSize: Vec2, spriteSize: Vec2, index : Float } { vcoord : Vec2 } | |
fragmentSpriteSheet = |
View mysqlmigrate.py
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 peewee import * | |
from playhouse import migrate | |
kwargs = dict( | |
host = 'localhost', | |
user = 'root', | |
passwd = '' # The legendary MySQL empty password | |
) | |
_db = MySQLDatabase('test', **kwargs) |
View upgrade.py
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
''' | |
Quick and dirty script to create a Bikini 2.x database file from previous 1.x /pages/* files. | |
''' | |
import hashlib, re, codecs, glob, sqlite3 | |
DATABASE_NAME = 'bikini.db' | |
ENCODING = 'utf-8' | |
FILENAME_MASK = u'./pages/%s%s.%s' | |
from bikini import storage |
View reset.css
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
/* http://meyerweb.com/eric/tools/css/reset/ | |
v2.0 | 20110126 | |
License: none (public domain) | |
*/ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, img, ins, kbd, q, s, samp, | |
small, strike, sub, sup, tt, var, u, center, |
View index_tmpl.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Ghost thumbnails</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="robots" content="noindex,nofollow" /> | |
#gallery a {background: transparent url(.thumbnails.jpg) top left no-repeat;} | |
</style> | |
</head> |