Skip to content

Instantly share code, notes, and snippets.

@p
p / task_core_queue_test.php
Created January 27, 2011 02:01
task_core_queue_test.php
<?php
/**
*
* @package testing
* @copyright (c) 2010 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
class phpbb_cron_task_core_queue_test extends PHPUnit_Framework_TestCase
#!/usr/bin/env python
# Synchronizes an upstream package to a new version of itself.
# Removes files/dirs in our version no longer present in the new version,
# and adds files/dirs from new version that are not in our version.
#
# Sample usage: sync-upstream current new
import re, os, os.path, shutil, subprocess, sys
require 'rubygems'
require 'ruote'
# preparing the engine
engine = Ruote::Engine.new(
Ruote::Worker.new(
Ruote::HashStorage.new))
pdef = Ruote.process_definition :name => 'test' do
require 'rubygems'
require 'ruote'
# preparing the engine
$engine = Ruote::Engine.new(
Ruote::Worker.new(
Ruote::HashStorage.new))
$child = Ruote.process_definition :name => 'child' do
# This is a basic VCL configuration file for varnish. See the vcl(7)
# man page for details on VCL syntax and semantics.
# backend definition
backend default {
.host = "tracker.phpbb.com";
.port = "80";
}
# transformations on client requests
@p
p / phpbb-reformat.pl
Created April 15, 2010 08:27
Reformat phpbb files to phpbb coding standards
#!/usr/bin/env perl
die "Usage: reformat-phpbb file ..." unless @ARGV;
if ($ARGV[0] == '-8') {
$indent = 8;
shift @ARGV;
} elsif ($ARGV[0] == '-2') {
$indent = 2;
shift @ARGV;
/**
* Cron task interface
* @package phpBB3
*/
interface cron_task
{
/**
* Runs this cron task.
*/
public function run();