Skip to content

Instantly share code, notes, and snippets.

View soulfly's full-sized avatar

Mr. software craftsman soulfly

View GitHub Profile
<iq type="get" to="[email protected]" id="561004347" from="[email protected]"><query xmlns="http://jabber.org/protocol/disco#info"></query></iq>
<iq xmlns="jabber:client" id="561004347" from="[email protected]" to="[email protected]" type="result"><query xmlns="http://jabber.org/protocol/disco#info"><identity name="Test Room Test" category="conference" type="text"></identity><feature var="http://jabber.org/protocol/muc"></feature><feature var="muc_semianonymous"></feature><feature var="muc_unmoderated"></feature><feature var="muc_open"></feature><feature var="muc_persistent"></feature><feature var="muc_public"></feature><feature var="muc_unsecured"></feature></query></iq>
@soulfly
soulfly / Chat MUC xmpp4r: add affilations
Created June 2, 2014 08:15
Chat MUC xmpp4r: add affilations
require 'xmpp4r/client'
require 'xmpp4r/muc'
puts "1"
client = Jabber::Client.new(Jabber::JID::new("[email protected]"))
client.connect
puts "2"
client.auth("emmaemma")
@soulfly
soulfly / Swift singleton implementation
Last active August 29, 2015 14:02
Swift singleton implementation
var myInstance:ChatService?
class ChatService {
class func instance() -> ChatService{
if !myInstance {
myInstance = ChatService()
println("init")
}
2014-07-08 12:20:42.417 Snippets[19144:1303] -[QBChat xmppStream:didSendIQ:] -> IQ: <iq type="get" to="muc.chat.quickblox.com" id="5610027"><query xmlns="http://jabber.org/protocol/disco#items"></query></iq>
2014-07-08 12:20:46.384 Snippets[19144:1303] -[QBChat xmppStream:didReceiveIQ:] -> <iq xmlns="jabber:client" from="muc.chat.quickblox.com" to="[email protected]/89DD494C-5D34-4590-9F9A-A08E817E0056" type="result" id="5610027"><query xmlns="http://jabber.org/protocol/disco#items"><item name="prod_2rrvthnzxz_2rrvtho2gh" jid="[email protected]"></item><item name="prod_2rrvthnz5c_2rrvtho2b5" jid="[email protected]"></item><item name="prod_2rrvthnzn2_2rrvtho11s" jid="[email protected]"></item><item name="prod_2rrvtho1xq_2rrvtho24l" jid="[email protected]"></item><item name="prod_2rrvtho2mv_2rrvtho47d" jid="[email protected]
ReplicaSetStatus{name=null, cluster=ClusterDescription{type=ReplicaSet, connectionMode=Multiple,
all=[ServerDescription{address=qb-mongo01-prod:27017, type=Unknown, hosts=[], passives=[], arbiters=[], primary='null', maxDocumentSize=16777216, maxMessageSize=33554432, maxWriteBatchSize=512, tags={}, setName='null', setVersion='null', averagePingTimeNanos=0, ok=false, state=Connecting, version=ServerVersion{versionList=[0, 0, 0]}, minWireVersion=0, maxWireVersion=0},
ServerDescription{address=qb-mongo02-prod:27017, type=Unknown, hosts=[], passives=[], arbiters=[], primary='null', maxDocumentSize=16777216, maxMessageSize=33554432, maxWriteBatchSize=512, tags={}, setName='null', setVersion='null', averagePingTimeNanos=0, ok=false, state=Connecting, version=ServerVersion{versionList=[0, 0, 0]}, minWireVersion=0, maxWireVersion=0}]}}
@soulfly
soulfly / gist:f9a124375fa9f33fff25
Created January 19, 2015 08:24
Q-municate Web issue
FB init Object
370094db.build.js:8 User d
370094db.build.js:15 App init s
370094db.build.js:9 FB status response Object
370094db.build.js:6 setting headers on request to https://api.quickblox.com/session.json
370094db.build.js:15 QB SDK: Session is created Object
370094db.build.js:5 [QBChat]: Status.CONNECTING
370094db.build.js:5 [QBChat]: Chat Protocol - BOSH
370094db.build.js:6 [QBChat RECV]: <stream:features xmlns=​"jabber:​client">​…​</stream:features>​
370094db.build.js:6 [QBChat SENT]: <auth xmlns=​"urn:​ietf:​params:​xml:​ns:​xmpp-sasl" mechanism=​"PLAIN">​…​</auth>​
@soulfly
soulfly / 4
Created February 3, 2015 12:34
4
-(void)completedWithResult:(Result *)result context:(void *)contextInfo
{
NSMutableDictionary *dict = (__bridge NSMutableDictionary *)contextInfo;
ChatMessage *message = dict[@"message"];
QBUUser *user = [[DataManager shared] currentUser];
self.isProcessing = NO;
@soulfly
soulfly / seemee17mar_update
Created March 17, 2015 15:45
seemee17mar_update
1) ChatManager.m
-(void)chatDidNotSendMessage:(QBChatMessage *)message error:(NSError *)error {
[self lastMessageFailedWithMessage:message error:error];
}
-(void)lastMessageFailedWithMessage:(QBChatMessage*)message error:(NSError *)error {
[self.delegate lastMessageSendingFailedWithMessage:message error:error];
}
2015-03-26 12:35:15.910 Snippets[18083:690585] json parsed
2015-03-26 12:35:19.593 Snippets[18083:690618] -[QBChat loginWithUser:resource:] -> Connecting to Chat, host: chattuul.quickblox.com, user JID: [email protected]/iPhone6Plus
2015-03-26 12:35:20.667 Snippets[18083:690619] QBChat/DidConnect
2015-03-26 12:35:20.667 Snippets[18083:690619] -[QBChat xmppStreamDidConnect:] -> Trying TLS...
2015-03-26 12:35:21.852 Snippets[18083:690655] -[QBChat xmppStreamDidSecure:] -> isSecure: YES
2015-03-26 12:35:22.261 Snippets[18083:690618] QBChat/DidConnect
2015-03-26 12:35:23.338 Snippets[18083:690655] -[QBChat xmppStreamDidAuthenticate:] -> user: 1773235, supportsStartTLS: 0
2015-03-26 12:35:23.340 Snippets[18083:690585] Did login
2015-03-26 12:35:23.341 Snippets[18083:690657] -[QBChat xmppStream:didSendIQ:] -> IQ SNT: <iq type="get" id="561006823"><query xmlns="jabber:iq:roster"></query></iq>
2015-03-26 12:35:23.342 Snippets[18083:690657] -[QBChat xmppStream:didSendPresence:] -> Presence SNT: <pre