Skip to content

Instantly share code, notes, and snippets.

View cordoval's full-sized avatar

Luis Cordova cordoval

View GitHub Profile
#!/bin/bash
SYMFREPO="git://symfony-git.git.sourceforge.net/gitroot/symfony-git/symfony-git"
DBUSER="root"
DBPASS=""
VENDOR_DIR="lib/vendor/symfony"
if [ -z "$DBPASS" ]; then
echo edit setupsymfony.sh to add your mysql password on line 4: DBPASS=\"password\"
exit
@jmather
jmather / converter.php
Created March 30, 2011 14:34
Convert KJB to array
<?php
function processFile($file)
{
$file = file_get_contents($file);
$book = array();
list($junk, $cont) = explode('<hr>', $file, 2);
@cordoval
cordoval / Usage.php
Created September 9, 2011 02:34 — forked from jjbohn/Usage.php
<?php
class DescribeIndex extends View
{
function itRendersTheSelectedVideo()
{
$video = \Mockery::mock(
'Application_Model_Video', array('getName' => 'Revolution OS'));
$output = $this->render('MyBundle:Video:detail.html.twig', array(
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@Ikke
Ikke / MethodDelegator.php
Created November 14, 2012 22:22
DCI using php
<?php
Trait MethodDelegator
{
private $roles = array();
private $method_map = array();
public function delegate($class)
{
@johnkary
johnkary / symfony-live-2013-portland.md
Last active December 17, 2015 15:29
Slides from Symfony Live 2013 - Portland
@lyrixx
lyrixx / post-checkout
Created June 26, 2013 13:37
Git post checkout
#!/bin/bash
# Put this file at: .git/hooks/post-checkout
# and make it executable
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587
PREV_COMMIT=$1
POST_COMMIT=$2
NOCOLOR='\e[0m'
@makasim
makasim / Facebook.php
Last active December 21, 2015 02:59
openid facebook\twitter
<?php
namespace Rj\CoreBundle\OAuth;
/**
* Copyright (c) 2010 Arnaud Le Blanc, all rights reserved
*/
/**
* Facebook OAuth 2.0 client
*/
@pvh
pvh / gist:6394061
Last active December 22, 2015 01:08

The PHP language owner is responsible for the success of Heroku developers building in PHP. They are part of the broader “languages team”, a group of developers with similar language-specific responsibilities and shared infrastructure.

A language owner will be responsible for varying degrees of

  • building core language-specific features such as the “build pack”,
  • working within the community to improve projects upstream to provide a better experience for Heroku users,
  • customer outreach,
  • customer support,
  • sales support,
  • language-specific documentation and content, and
  • marketing responsibilities such as attending and speaking at conferences.
<?php
require_once __DIR__.'/autoload.php.dist';
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
use Symfony\Component\Routing\Matcher\UrlMatcher;
use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
use Symfony\Component\Routing\RequestContext;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Route;