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
INSTALLED_APPS = [ | |
# ... | |
'djangocms_tonicdev', | |
# ... | |
] |
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
INSTALLED_APPS = [ | |
# ... | |
'dtx', | |
# ... | |
] |
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
DTX_WEB_SITES = ( | |
( # Handle example app by Twisted | |
u'.*/example/test/', | |
'example.urls', | |
), | |
( # Handle all other requests by WSGI | |
u'.*', | |
'wsgi', | |
), | |
) |
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
urlpatterns = patterns('', | |
url(r'^example/test/(?P<item_id>.*)/', | |
'example.views.gw2test', | |
{ 'api': 'https://api.guildwars2.com/v1/' } | |
) | |
) |
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
@inlineCallbacks | |
def gw2test(request, item_id, api): | |
x = yield getPage(api + 'item_details.json?item_id=' + str(item_id)) | |
details = json.loads(x) | |
returnValue(HttpResponse( | |
str(details['name']), | |
content_type='text/plain' | |
)) |
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 asyncio | |
async def slow_operation(n): | |
await asyncio.sleep(1) | |
print("Slow operation {} complete".format(n)) | |
async def main(): | |
await asyncio.wait([ | |
slow_operation(1), | |
slow_operation(2), |
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 asyncio | |
@asyncio.coroutine | |
def slow_operation(n): | |
yield from asyncio.sleep(1) | |
print("Slow operation {} complete".format(n)) | |
@asyncio.coroutine | |
def main(): | |
yield from asyncio.wait([ |
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
cd plugins | |
ln -s disabled-Multiuser Multiuser |
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
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
upstream zeronet_backend { | |
server 127.0.0.1:43110; | |
} | |
server { |
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 httpRequest = require('request'); | |
var urljoin = require('url-join'); | |
var nmcpp = require('nmcpp'); | |
var DNSChainProvider = nmcpp.Provider.extend({ | |
init: function(opts) { | |
this.addr = opts.addr; | |
}, | |
load: function(name, callback) { | |
httpRequest({ |