Skip to content

Instantly share code, notes, and snippets.

/**
* Cron task interface
* @package phpBB3
*/
interface cron_task
{
/**
* Runs this cron task.
*/
public function run();
@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;
# 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
require 'rubygems'
require 'ruote'
# preparing the engine
$engine = Ruote::Engine.new(
Ruote::Worker.new(
Ruote::HashStorage.new))
$child = Ruote.process_definition :name => 'child' do
require 'rubygems'
require 'ruote'
# preparing the engine
engine = Ruote::Engine.new(
Ruote::Worker.new(
Ruote::HashStorage.new))
pdef = Ruote.process_definition :name => 'test' do
#!/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
@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
@p
p / gist:851975
Created March 2, 2011 23:13
Git aliases
pie@area phpbb % git config -l |grep alias
alias.st=status
alias.ts=status
alias.ci=commit
alias.co=checkout
alias.fa=fetch --all
alias.rh=reset HEAD
alias.dc=diff --cached
alias.sdc=svn dcommit
alias.cp=cherry-pick
(20:16:19) bantu: Feedback please. http://tracker.phpbb.com/browse/PHPBB3-9922?focusedCommentId=35566&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-35566
(20:18:41) nn-: i don't see where the hyperlink existed previously
(20:18:50) nn-: github cutting off the view does not help
(20:19:32) bantu: nn-: one second
(20:19:55) nn-: tested on styles demo
(20:20:07) nn-: so the icon does link to post but there is essentially no indication that it does
(20:20:13) bantu: http://temp.andreasfischer.net/9922_without_patch.png http://temp.andreasfischer.net/9922_with_patch.png
(20:21:03) nn-: i'm ok with changing it
(20:21:40) nn-: i wonder if those who object to this change use subsilver
(20:21:49) nn-: this sounds like an improvement on usability
@p
p / Building
Created March 9, 2011 01:02
Build commands for various packages
# apache 2.0
./configure --prefix=/opt/apache-2.0.64 --enable-so
# php 4.4
# php bundles mysql, default is to use bundled
# php bundles gd apparently, default is to not use it
./configure --prefix=/opt/php-4.4.9 --with-pgsql=/opt/postgresql-7.3.21 --with-apxs2=/opt/apache-2.0.64/bin/apxs --enable-fastcgi --with-gd=/usr/local --with-mysql=/usr/local