Skip to content

Instantly share code, notes, and snippets.

View donpinkster's full-sized avatar

Don Pinkster donpinkster

  • Sqills
  • Netherlands
View GitHub Profile
# /
array
'action' => string 'mypage' (length=6)
'parameters' =>
array
empty
# /projects
array
'action' => string 'projects' (length=8)
<?php
class tfObjectRouteCollection extends sfObjectRouteCollection
{
public function __construct(array $options)
{
$options = array_merge(array(
'methods_for_query' => array()
), $options);
<?php
use \Pwango\Response\HttpResponse;
function index(\Pwango\Request $request)
{
return new HttpResponse('Index of Projects');
}
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)
We couldn’t find that file to show.
<?php
class sfMessageSource_Doctrine extends sfMessageSource
{
public function &loadData($variant)
{
$rows = Doctrine_Query::create()
->from('TransUnit t')
->leftJoin('t.Catalogue c')
->where('c.name=?', $variant)
#!/usr/bin/ruby
zones_directory = "/var/named/slaves/*.hosts"
domains = Dir.glob(zones_directory).collect { |file| File.basename(file).sub(".hosts", "") }
domains.each do |domain|
print `rndc retransfer #{domain}`
end
require 'spec_helper'
describe SessionController do
it "should show the login page at new action" do
get :new
response.should be_success
end
context "authentication failure" do
Feature: User Authentication
In order to play the game
As an registrered user
I want to be able to login
Background:
Given I have the user "john@doe.nl" with password "foobar"
Scenario: Logging in with incorrect credentials
Given I am on the login page
<?php
class User
{
protected $id;
protected $name;
public function setId($id)
{
$this->id = $id;