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
<ul class="deviants"> | |
{{#deviants}} | |
<li><a href="http://{{username}}.deviantart.com/" title="{{username}}" class="upage">{{symbol}}{{username}}</a><a href="/account/remove/{{username}}" title="remove {{username}} from account" class="rem">Remove</a></li> | |
{{/deviants}} | |
{{^deviants}} | |
<li><em>No accounts authorised</em></li> | |
{{/deviants}} | |
</ul> |
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
var callback = function( ) { | |
// Stuff you actually want to do. | |
}; | |
var afterFirst = function( callback ) { | |
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
Some ideas for how the dAmn protocol could be adapted for video calls. | |
Sticking to existing protocol packet structures as closely as possible, | |
send and recv packets could be used if subpacket namespaces were permitted. | |
For subpackets, namespaces of the form call:callname could be used. Any | |
name could be used for a call, so long as that name is not already in use | |
within the channel the call is being operated in. | |
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
Server | |
AppManager app | |
AppManager | |
add(name, cls) | |
apps[name] = cls | |
get(name) | |
return apps[name] || null; | |
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
function init_lobber() { | |
// Create a lobber server! | |
var lserv = new lobber.Server( { | |
server: { | |
websocket: 8044, | |
socket: 8080 | |
} | |
}); |
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
PFYPacket *pkt = [PFYPacket fromNSData:data]; | |
if([[pkt cmd] isEqualToString:@"dAmnServer"]) { | |
NSLog(@"Connected to dAmnServer %@",[pkt param]); | |
NSString *pkt = @"login photofroggy\npk=*****************\n\0"; | |
[socket writeData:[pkt dataUsingEncoding:NSUTF8StringEncoding] withTimeout:-1 tag:2]; | |
} | |
if([[pkt cmd] isEqualToString:@"login"]) { | |
if(![[pkt argument:@"e"] isEqualToString:@"ok"]) { |
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
// | |
// PFYPacket.m | |
// dAmnGDCAsyncTest | |
// | |
// Created by Henry on 05/05/2014. | |
// Copyright (c) 2014 dAmnLab. All rights reserved. | |
// | |
#import "PFYPacket.h" |
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
Video Chat Server | |
Video calls should be associated with a particular channel. | |
They should also have a host. | |
Should users have privilege levels? | |
Data: | |
User | |
Connection |
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
Possible classes for a dAmn client. | |
BASIC NETWORKING | |
This stuff is used to open and manage a connection to a server. | |
Possibly have some of this stuff as a separate project. | |
Connection | |
protocol() - create a socket protocol |
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
''' Huffman Encoding and Decoding. | |
Henry Rapley, 2014. | |
Shitty implementation. | |
Got damn this code is messy. | |
But it works! Wooo! | |
''' | |
def cmpval(x, y): |
NewerOlder