Skip to content

Instantly share code, notes, and snippets.

View samsoir's full-sized avatar

Sam de Freyssinet samsoir

View GitHub Profile
<?php
$my_array = array
(
'one' => 'value',
'two' => 'another_value',
'three' => 'final_value'
);
<?php
protected function get_stocks()
{
// Get the arguments supplied to this function
$args = func_get_args();
// Get the options supplied
$include_disabled = (bool) in_array('disabled', $args);
$include_empty = (bool) in_array('empty', $args);
<?php
public function index()
{
$profiler = new Profiler();
$user_address = ORM::factory('Address', 45895);
<?php
javascript::add(DOCROOT.'assets/js/facebox.js');
$scripts = array
(
DOCROOT.'assets/js/facebox.js',
DOCROOT.'assets/js/facebox.js',
DOCROOT.'assets/js/facebox.js',
DOCROOT.'assets/js/facebox.js',
);
<?
// Ensure we're dealing with local
if ( ! filter_var($ip_address, FILTER_FLAG_NO_PRIV_RANGE) OR filter_var( ! $ip_address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4))
return TRUE;
[Tue Mar 03 14:41:07 2009] [error] [client 81.136.137.144] (9)Bad file descriptor: Could not open password file: (null)
81.136.137.144 - wgilk [03/Mar/2009:14:41:07 +0000] "OPTIONS /mukuru/trunk HTTP/1.1" 200 - "-" "SVN/1.5.6 (r36142) neon/0.28.3"
81.136.137.144 - - [03/Mar/2009:14:41:07 +0000] "OPTIONS /mukuru/trunk HTTP/1.1" 401 459 "-" "SVN/1.5.6 (r36142) neon/0.28.3"
81.136.137.144 - wgilk [03/Mar/2009:14:41:07 +0000] "OPTIONS /mukuru/trunk HTTP/1.1" 200 - "-" "SVN/1.5.6 (r36142) neon/0.28.3"
81.136.137.144 - wgilk [03/Mar/2009:14:41:08 +0000] "PROPFIND /mukuru/trunk HTTP/1.1" 207 352 "-" "SVN/1.5.6 (r36142) neon/0.28.3"
81.136.137.144 - wgilk [03/Mar/2009:14:41:08 +0000] "PROPFIND /mukuru/!svn/vcc/default HTTP/1.1" 207 255 "-" "SVN/1.5.6 (r36142) neon/0.28.3"
81.136.137.144 - wgilk [03/Mar/2009:14:41:08 +0000] "REPORT /mukuru/!svn/bc/0/trunk HTTP/1.1" 404 357 "-" "SVN/1.5.6 (r36142) neon/0.28.3"
81.136.137.144 - wgilk [03/Mar/2009:14:41:08 +0000] "PROPFIND /mukuru/trunk HTTP/1.1" 207 352 "-" "SVN/1.5.6 (r36142) neon/0.28.3"
81.136.137.144 - wgilk [03/Mar/2009:14:41:08 +0000] "PROPFIND /mukuru/!svn/vcc/default HTTP/
Tue Mar 03 14:43:53 2009] [error] [client 81.136.137.144] Could not fetch resource information. [403, #0]
[Tue Mar 03 14:43:53 2009] [error] [client 81.136.137.144] The URI does not contain the name of a repository. [403, #190001]
[Tue Mar 03 14:43:55 2009] [error] [client 81.136.137.144] (9)Bad file descriptor: Could not open password file: (null)
[Tue Mar 03 14:43:55 2009] [error] [client 81.136.137.144] Could not fetch resource information. [403, #0]
[Tue Mar 03 14:43:55 2009] [error] [client 81.136.137.144] The URI does not contain the name of a repository. [403, #190001]
[Tue Mar 03 14:46:44 2009] [error] [client 81.136.137.144] (9)Bad file descriptor: Could not open password file: (null)
[Tue Mar 03 14:46:44 2009] [error] [client 81.136.137.144] Could not fetch resource information. [500, #0]
[Tue Mar 03 14:46:44 2009] [error] [client 81.136.137.144] The server is misconfigured: either an SVNPath or SVNParentPath directive is required to specify the location of this resource's repository. [500, #190000]
<?php
/**
* Clears the cache for Curl library
*
* @param bool all if TRUE will delete all Curl library caches
* @return Curl
* @author Sam Clark
*/
public function clear_cache($all = FALSE)