Skip to content

Instantly share code, notes, and snippets.

View jrbasso's full-sized avatar

Juan Basso jrbasso

  • Zumba
  • Pembroke Pines, FL, USA
  • X @jrbasso
View GitHub Profile
diff --git a/lib/Cake/Network/CakeRequest.php b/lib/Cake/Network/CakeRequest.php
index cadbbbd..dfa1d3e 100644
--- a/lib/Cake/Network/CakeRequest.php
+++ b/lib/Cake/Network/CakeRequest.php
@@ -694,26 +694,7 @@ class CakeRequest implements ArrayAccess {
* @return array An array of prefValue => array(content/types)
*/
public function parseAccept() {
- $accept = array();
- $header = explode(',', $this->header('accept'));
#!bash
#
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
@jrbasso
jrbasso / AllAppTest.php
Created August 4, 2012 21:47
All application tests ignoring CakePHP core files from Code Coverage
<?php
class AllAppTest extends CakeTestSuite {
protected $coverageSetup = false;
public static function suite() {
$suite = new self('All Application Tests');
$suite->addTestDirectoryRecursive(dirname(__FILE__));
return $suite;
{
"data": {
"ControllerName": [{
"resource": "ControllerName",
"http_method": "GET",
"uri": "\/controller_name",
"params": [],
"doc_comment": {
"description": "List all the things",
"tags": {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>API Web Runner</title>
<link href="bootstrap20/css/bootstrap.min.css" rel="stylesheet" />
<link href="bootstrap20/css/bootstrap-responsive.min.css" rel="stylesheet" />
<link href="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.22/themes/redmond/jquery-ui.css" rel="stylesheet" />
<style type="text/css">
@jrbasso
jrbasso / bash_completation.php
Created August 19, 2012 23:20
PHP code for
<?php
// In my job.php file
if ($argv[1] === '__check__') {
if (empty($argv[2])) {
echo implode(' ', \Zumba\Job\Job::availableJobs());
} else {
$class = getJobClass($argv[2]);
if (class_exists($class)) {
echo implode(' ', $class::availableMethods());
# Bash completation for application
_my_application()
{
local cur prev opts job
COMPREPLY=()
job="${COMP_WORDS[0]}"
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
<!DOCTYPE html>
<html>
<body>
<form method="get">
<input type="text" name="search">
</form>
</body>
</html>
<?php
namespace Cake\Core {
trait Log {
public function log() {
echo 'hi';
}
}
}