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 { | |
server_name localhost; | |
listen 127.0.0.1:80; | |
root /home/ivo/www/home/public_html; | |
index index.php index.html; | |
error_log /home/ivo/www/home/error.log;# debug; | |
access_log /home/ivo/www/home/access.log; |
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 { | |
set $domain home; | |
server_name ~^((?<domain>.+)\.)localhost$; | |
listen 127.0.0.1:80; | |
root /home/ivo/www/$domain/public_html; | |
index index.php index.html; | |
error_log /home/ivo/www/$domain/error.log;# debug; |
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 { | |
server_name localhost; | |
rewrite ^ http://default.localhost$request_uri? redirect; | |
} | |
server { | |
server_name ~^(?<domain>.+)\.localhost$; | |
listen 127.0.0.1:80; |
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 { | |
server_name localhost; | |
rewrite ^ http://default.localhost$request_uri? redirect; | |
} | |
server { | |
server_name ~^(?<domain>.+)\.localhost$; | |
root /home/ivo/www/$domain; |
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
<?php | |
mysql_connect('localhost', 'cake', 'cakephp') or die(); | |
mysql_select_db('cake_noteven') or die(); | |
?> | |
<?php phpinfo(); ?> |
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
<?php | |
class DATABASE_CONFIG { | |
public $dev = array( | |
'datasource' => 'Database/Mysql', | |
'persistent' => false, | |
'host' => 'localhost', | |
'login' => 'cake', | |
'password' => 'cakephp', | |
'database' => 'cake_noteven', |
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 | |
import gevent | |
from gevent import socket, event | |
if __name__ == "__main__": | |
s = socket.fromfd(sys.stdin.fileno(), socket.AF_UNIX, | |
socket.SOCK_STREAM) | |
print type(s) | |
e = event.Event() | |
def rea(sock, ee): |
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 | |
import gevent | |
from gevent import socket, event | |
if __name__ == "__main__": | |
e = event.Event() | |
def rea(ee): | |
while True: | |
while not ee.is_set(): | |
socket.wait_read(sys.stdin.fileno()) |
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 | |
import os | |
import fcntl | |
import gevent | |
from gevent import socket, queue | |
if __name__ == "__main__": | |
fcntl.fcntl(sys.stdin, fcntl.F_SETFL, os.O_NONBLOCK) | |
q = queue.Queue() | |
def rea(): |
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 gevent | |
class Publisher(object): | |
def __init__(self): | |
self.channels = [] | |
self.subscribers = [] | |
self.subscriptions = {} | |
self.publications = {} |