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
package main | |
import ( | |
"fmt" | |
"github.com/iwanbk/ogric" | |
"log" | |
"os" | |
) | |
const myNick = "botku" |
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
http://web.archiveorange.com/archive/v/1XS1vAjrtSZXwtoV7Gzb |
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
#original code from http://pastebin.com/EDwwNhqq | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) | |
s.bind(("0.0.0.0", port)) | |
fork() | |
address = socket.fromfd(s.fileno(), socket.AF_INET, socket.SOCK_STREAM) | |
address.listen() |
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 sys | |
from gevent import server | |
from gevent.baseserver import _tcp_listener | |
from gevent.monkey import patch_all; patch_all() | |
from multiprocessing import Process, current_process, cpu_count | |
def note(format, *args): | |
sys.stderr.write('[%s]\t%s\n' % (current_process().name, format%args)) |
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 json | |
import socket | |
s = socket.create_connection(("127.0.0.1", 5090)) | |
s.sendall(json.dumps(({"id": 1, "method": "Hello.Hello", "params": ["hello"]}))) | |
print s.recv(4096) |
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
""" | |
BOSH Client | |
----------- | |
Quite simple BOSH client used by Django-XMPPAuth | |
For now, it only supports the DIGEST-MD5 authentication method. | |
""" | |
import httplib, sys, random |
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
# The upstream server doesn't need a prefix! no need for wss:// or http:// because nginx will upgrade to http1.1 in the config below | |
upstream yeomanserver { | |
server localhost:3000; | |
} | |
server { | |
listen 443; | |
server_name legionofevil.org; | |
root html; |
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
#!KAMAILIO | |
# | |
# Kamailio (OpenSER) SIP Server v3.1 - default configuration script | |
# - web: http://www.kamailio.org | |
# - git: http://sip-router.org | |
# | |
# Direct your questions about this file to: <sr-users@lists.sip-router.org> | |
# | |
# Refer to the Core CookBook at http://www.kamailio.org/dokuwiki/doku.php | |
# for an explanation of possible statements, functions and parameters. |
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
State machine: c0000_Started_2_Outgoing_X_oINVITE | |
SIPml-...svn=179 (line 1) | |
ICE servers:[{"url":"stun:23.21.150.121:3478"},{"url":"stun:216.93.246.18:3478"},{"url":"stun:66.228.45.110:3478"},{"url":"stun:173.194.78.127:19302"}] | |
SIPml-...svn=179 (line 1) | |
onGetUserMediaSuccess | |
SIPml-...svn=179 (line 1) | |
createOffer | |
SIPml-...svn=179 (line 1) | |
==session event = m_stream_audio_local_added | |
SIPml-...svn=179 (line 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
#!/usr/bin/env python | |
import timeit | |
import jsonrpclib | |
import ujson | |
import requests | |
N_TEST = 10000 | |
server_json = jsonrpclib.Server('http://localhost:8000/json/') |
OlderNewer