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
def push(self, limit=None): | |
""" Push some queued items out of the queue. | |
This method causes queued items to be written to be saved to a file. | |
Only `limit` items will be pushed out of the queue. If `limit` is | |
`0`, then all items will be pushed from the queue. | |
""" | |
if limit is None: | |
limit = self.default_push |
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 os | |
import os.path | |
from stutter import logging | |
class ChannelLogger(logging.ThreadedLogger): | |
""" Channel-concious logger. | |
This logger hopefully manages to save logs for different channels in | |
appropriate sub folders of the logging directory. |
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
''' Sub commands | |
Hackish experiment in supporting sub commands using | |
reflex as a base. Thrown together pretty quickly. | |
TODO: | |
- clean up? | |
Based on the command stuff found in Terra. | |
''' |
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
''' dAmnViper.dA.oauth module | |
Copyright (c) 2011, Henry "photofroggy" Rapley. | |
Released under the ISC License. | |
This module provides objects which can be used to authorize applications | |
with deviantart.com's oAuth API. Note that this product is in no way | |
affiliated with or endorsed by deviantART.com. This is not an official | |
service of deviantART.com. This is an independent project created by | |
photofroggy. | |
''' |
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
''' Example usage of oAuth objects. | |
Created by photofroggy. | |
''' | |
import os | |
import sys | |
from twisted.internet import reactor | |
sys.path.insert(0, os.curdir) |
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
''' Copyright (c) 2011, Henry "photofroggy" Rapley. | |
Released under the ISC License. | |
This module provides objects which can be used to authorize applications | |
with deviantart.com's oAuth API. Note that this product is in no way | |
affiliated with or endorsed by deviantART.com. This is not an official | |
service of deviantART.com. This is an independent project created by | |
photofroggy. | |
''' |
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
// This stuff determines how certain tablumps are handled. | |
// lumps[tag] => [ chunks, callback ] | |
this.lumps = { | |
'&a\t': [ | |
2, function( data ) { | |
return '<a target="_blank" href="'+data[0]+'" title="'+data[1]+'">'; | |
} | |
] | |
}; |
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
this.lumps = { | |
'&avatar\t': [ 2, function( data ) { | |
un = data[0]; | |
icon = data[1]; | |
ru = new RegExp('\\$un(\\[([0-9]+)\\])', 'g'); | |
function repl( m, s, i ) { | |
return un[i].toLowerCase(); | |
} | |
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
io.sockets.on('connection', function (socket) { | |
var client = net.connect({host: 'chat.deviantart.com', port: 3900}); | |
client.on('data', function(data) { | |
socket.send( data ); | |
}); | |
client.on('end', function() { | |
socket.disconnect(); | |
}); |
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
<html> | |
<head> | |
<title>dAmn Chat</title> | |
<style type="text/css"> | |
body { | |
width: auto; | |
margin: 0; | |
padding: 0; | |
height: 97%; | |
overflow: hidden; |
OlderNewer