Skip to content

Instantly share code, notes, and snippets.

View donpinkster's full-sized avatar

Don Pinkster donpinkster

  • Sqills
  • Netherlands
View GitHub Profile
import socket, ssl, struct
from eppxml.hello import Hello
class Client(object):
def connect(self, host, port):
self.connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.connection.setblocking(0)
self.connection.settimeout(10)
self.connection = ssl.wrap_socket(self.connection)
<?php
use \Pwango\Response\HttpResponse;
function index(\Pwango\Request $request)
{
return new HttpResponse('Index of Projects');
}
<?php
class tfObjectRouteCollection extends sfObjectRouteCollection
{
public function __construct(array $options)
{
$options = array_merge(array(
'methods_for_query' => array()
), $options);
# /
array
'action' => string 'mypage' (length=6)
'parameters' =>
array
empty
# /projects
array
'action' => string 'projects' (length=8)