Skip to content

Instantly share code, notes, and snippets.

socnet {
user users[x],
group groups[y],
}
user {
string name,
string profile,
string username,
string password,
k=1; i=[1,2]
while k:
for j in i:
k*=j
i.append(k+1)
k=1
<html>
<head>
<title>Identi.ca &raquo Real-Timeline</title>
<!--jQuery-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<!--Main Script-->
<script>
<?php
/**
* ppaste - Quick paste pictures anytime anywhere
*
* @author Bela Hausmann <post@belahausmann.name>
* @link http://bitbucket.org/and3k/ppaste/
* @version 1.0_rc1
* @copyright Copyright (c) 2009 Bela Hausmann, see README
* @license http://opensource.org/licenses/agpl-v3.html GNU Affero General Public License version 3
*/
@shashi
shashi / config.php
Created May 31, 2009 18:13
Scripts for a free image hosting service
<?php
if(!@$PPASTE) die("Access Denied!");
$PPASTE_VERSION = '0.1_rc1';
$PPASTE_UPLOAD_DIR = 'p/';
$PPASTE_UPLOAD_URL = 'p/';
$PPASTE_CODE_LENGTH = 8;
$PPASTE_SHOW_TAIL = true;
$PPASTE_SHOW_FILETYPES = true;
__license__ = """
Sonata, an elegant GTK+ client for the Music Player Daemon
Copyright 2006-2008 Scott Horowitz <stonecrest@gmail.com>
This file is part of Sonata.
Sonata is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
#!/usr/bin/env python
## MegaHAL XMPP bot version 0.1
##
## Copyright (C) 2009 Shashi Gowda <connect2shashi@gmail.com>
##
## (Most part of the code in this file is derived from jabber-logger.py)
## This program is free software; you can redistribute it and/or modify
## it under the terms of the MIT Lisence
@shashi
shashi / irclogger.py
Created August 2, 2009 13:47
A Neat IRC Logger.
#!/usr/bin/python
# IRC Logger.
# By Shashi Gowda <http://identi.ca/shashi>.
import sys
import socket
import time
import os
# Ugly hack for LyricWiki API.
# Steps:
# Open /usr/lib/python2.6/site-packages/sonata/info.py
# (python2.5, or any proper version should be substituted)
# Search for:
# "lyrics = self.lyricServer.getSong"
# Add this in the next line:
lyrics = urllib.urlopen("http://lyricwiki.org/"+self.lyricwiki_format(search_artist)+":"+self.lyricwiki_format(search_title)).read().split("<div class='lyricbox' >")[1].split("</div>")[0].replace('<br />',"\n")