Skip to content

Instantly share code, notes, and snippets.

View ThePixelDeveloper's full-sized avatar
🛒
Sparket Market

Mathew Davies ThePixelDeveloper

🛒
Sparket Market
View GitHub Profile
<?php
/**
*
*/
public function get_ratings(Model_User $user)
{
$query = $this->reset()->select
(
'users.username',
<?php
/**
* When given a coaster ID, this method will recalculate the number of downloads
* a coaster has had. The reason for manual queries is because it's around 300% faster than
* the current method.
*
* Use this function only when you want to bulk update a lot of coasters at the
* same time.
*
* @param type $id
<?php defined('SYSPATH') or die('No direct script access.');
/**
* Tests the coaster download policy.
*
* @package Unittest
* @author Mathew Davies
*/
class Test_Coaster_Download_Policy extends Kohana_Unittest_TestCase
{
/*
* jquery.uploadProgress
*
* Copyright (c) 2008 Piotr Sarnacki (drogomir.com)
* - Original release.
*
* Copyright (c) 2011 Mathew Davies ([email protected])
* - Refactored a lot of code into their own functions
*
* Licensed under the MIT license:
1x time spiral (NM) - 20
4x gaea's cradle (NM) - 200
1x force of will (NM) - 55-60
1x chrome mox (GP foil) - 20
1x mirror universe (NM-) - 25
1x mirror universe (italian) - 15
4x berserk (1 beta NM, 1 beta MP, 2 UL NM) - 150
2x dark ritual (beta) - 30
4x wasteland (MP) - 120
1x candelabra (MP) - 200
<?php
/*
* This file is part of the Behat\Mink.
* (c) Konstantin Kudryashov <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
<?php
namespace Behat\Mink\Driver;
use Goutte\Client as GoutteClient,
Symfony\Component\BrowserKit\Client,
Symfony\Component\DomCrawler\Crawler,
Symfony\Component\DomCrawler\Field\ChoiceFormField;
use Behat\Mink\Session,
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* @package Kohana/Codebench
* @category Tests
* @author Mathew Davies <[email protected]>
*/
class Bench_Resize extends Codebench
{
public $description = 'Find out the fastest possible way to create an image thumbnail.';
'SCRIPT_NAME' => string '/ö +' (length=5)
'REQUEST_URI' => string '/%C3%B6%20+' (length=11)
'DOCUMENT_URI' => string '/ö +' (length=5)
'PHP_SELF' => string '/ö +' (length=5)
array
'HOSTNAME' => string '' (length=0)
'PATH' => string '/usr/local/bin:/usr/bin:/bin' (length=28)
'TMP' => string '/tmp' (length=4)
'TMPDIR' => string '/tmp' (length=4)
'TEMP' => string '/tmp' (length=4)
'OSTYPE' => string '' (length=0)
'MACHTYPE' => string '' (length=0)
'MALLOC_CHECK_' => string '2' (length=1)
'USER' => string 'www-data' (length=8)