- version 3.6
Check those constraints:
$this->anything()
# | |
# this gist can be used to list all targets, or - more correctly - rules, | |
# that are defined in a Makefile (and possibly other included Makefiles) | |
# and is inspired by Jack Kelly's reply to a StackOverflow question: | |
# | |
# http://stackoverflow.com/questions/3063507/list-goals-targets-in-gnu-make/3632592#3632592 | |
# | |
# I also found this script - http://www.shelldorado.com/scripts/cmds/targets - which does | |
# something similar using awk, but it extracts targets from the "static" rules from a single | |
# Makefile, meaning it ignores any included Makefiles, as well as targets from "dynamic" rules |
<?php defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* Extension of Kohana_Security class | |
* | |
* @package Misc | |
* @category Security | |
* @author Miodrag Tokić <mtokic@gmail.com> | |
* @copyright (c) 2011, Miodrag Tokić | |
*/ | |
class Security extends Kohana_Security { |
#!/bin/bash | |
MAJOR_VERSION=$1 | |
MINOR_VERSION=$2 | |
if [ $# -lt 2 ] | |
then | |
echo "Usage: $0 <MAJOR-VERSION> <MINOR-VERSION>" | |
exit | |
fi |
@media screen and (-webkit-min-device-pixel-ratio:0) { | |
/* Webkit specific code here */ | |
} |
# Turn on URL rewriting | |
RewriteEngine On | |
# Installation directory | |
RewriteBase / | |
# Protect hidden files from being viewed | |
<Files .*> | |
Order Deny,Allow | |
Deny From All |
<?php | |
/** | |
* Applys a function to a specific set of keys in an array | |
* | |
* @param array & $source_array the array to apply the callback to | |
* | |
* @return null | |
*/ | |
public function apply( & $source_array, $callback, $keys) |
<?php defined('SYSPATH') OR die('No direct access allowed.'); | |
abstract class Jelly_Model_MPTT extends Jelly_Model { | |
protected static $_columns = array( | |
'left' => 'lft', | |
'right' => 'rgt', | |
'scope' => 'scope', | |
'level' => 'lvl', | |
'parent_id' => 'parent_id', |
<?php defined('SYSPATH') or die('No direct script access.'); | |
class Kohana_Exception extends Kohana_Kohana_Exception { | |
public static function handler(Exception $e) | |
{ | |
if (Kohana::DEVELOPMENT === Kohana::$environment) | |
{ | |
parent::handler($e); | |
} |
<?php | |
// http://www.movable-type.co.uk/scripts/latlong.html | |
// converted from JS to PHP | |
$d_lat = deg2rad($lat1 - $lat2); | |
$d_lon = deg2rad($lon1 - $lon2); | |
$lat1 = deg2rad($lat1); | |
$lat2 = deg2rad($lat2); |