Skip to content

Instantly share code, notes, and snippets.

View TomiToivio's full-sized avatar

Tomi Toivio TomiToivio

View GitHub Profile
@TomiToivio
TomiToivio / getbook.inc.php
Created April 4, 2012 00:13
fi.flossmanuals.net modified getbook
<?php
//we need this lib for deleting dirs
include_once("lib/files.inc.php");
function getbook_admin() {
if(!is_dir("tmp")) mkdir("tmp");
$update = tempnam("tmp/", "update_");
$updatetext.= _("Processing...")."<br>"._("Requesting book");
$book = $_POST['book'];
@TomiToivio
TomiToivio / django.po
Created April 14, 2012 16:07
Booktype Finnish Localization
# This file is distributed under the same license as the Booktype package.
#
# Tomi Toivio <tomi@flossmanuals.net>, 2012.
msgid ""
msgstr ""
"Project-Id-Version: Booktype\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-04-08 23:25+0200\n"
"PO-Revision-Date: 2012-04-14 18:59+0300\n"
"Last-Translator: Tomi Toivio <tomi@flossmanuals.net>\n"
<div class="recent-activity">
<h2>Users online:</h2>
{% for key, value in users %}
{% for username in value %}
<div class="user"><a href="{% url view_profile username %}" class="user"><div class="image"><img src="{% url view_profilethumbnail username %}?width=24" al\
t="{{username}}"></div><b>{{ username }}</b></a></div>
{% endfor %}
{% endfor %}
</div>
import sputnik
client_id = sputnik.get("sputnik:client_id")
sputnikchannels = sputnik.smembers("sputnik:channels")
chnl = {}
for ch in sputnik.rkeys("sputnik:channel:*:channel"):
chnl[ch] = sputnik.smembers(ch)
# This file is part of Booktype.
# Copyright (c) 2012 Aleksandar Erkalovic <aleksandar.erkalovic@sourcefabric.org>
#
# Booktype is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Booktype is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
{% extends "base.html" %}
{% load i18n %}
{% block header %}
<title>Booktype</title>
<script>
$(function() {
$("#formsignin").booksparkSignin({'url': '{% url signin %}'});
$("#formregister").booksparkRegister({'url': '{% url signin %}', 'redirect': '{% url view_profile 'XXX' %}'});
@TomiToivio
TomiToivio / CSS Tweaks 1
Created July 23, 2012 19:55
Status.net Base CSS
/** theme: base
*
* @package StatusNet
* @author Samantha Doherty <sammy@status.net>
* @copyright 2011 StatusNet, Inc.
* @license http://creativecommons.org/licenses/by/3.0/ Creative Commons Attribution 3.0 Unported
* @link http://status.net/
*/
@TomiToivio
TomiToivio / Status.net Tweaks 2
Created July 23, 2012 19:56
Status.net Neo CSS
/** theme: neo
*
* @package StatusNet
* @author Samantha Doherty <sammy@status.net>
* @copyright 2011 StatusNet, Inc.
* @license http://creativecommons.org/licenses/by/3.0/ Creative Commons Attribution 3.0 Unported
* @link http://status.net/
*/
@font-face {
@TomiToivio
TomiToivio / statusnet.po
Created September 18, 2012 20:07
StatusNet suomeksi
# Translation of StatusNet - Core to Finnish (suomi)
# Exported from translatewiki.net
#
# Author: Crt
# Author: Jaakko
# Author: Josutus
# Author: McDutchie
# Author: Nike
# Author: Silvonen
# Author: Str4nd
@TomiToivio
TomiToivio / statusnet.po
Created September 25, 2012 19:42
Statusnet.po
# Translation of StatusNet to Finnish (suomi)
# Exported from translatewiki.net
#
# Author: Centerlink
# Author: Crt
# Author: Jaakko
# Author: Josutus
# Author: MJK
# Author: Nike
# Author: Silvonen