Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| <?php | |
| /** | |
| * @author Marco Pivetta <[email protected]> | |
| */ | |
| use Zend\ServiceManager\ServiceManager; | |
| use Zend\Mvc\Service\ServiceManagerConfig; | |
| use DoctrineORMModuleTest\Framework\TestCase; | |
| use ContentTest\Util\ServiceManagerFactory; | |
| use Zend\Loader\StandardAutoloader; |
| # Title: MP3 tag for Jekyll | |
| # Authors: Devin Weaver, Daniel Roos (youtube changes) | |
| # Description: Allows mp3 tag to include mp3 files embedded into the post. | |
| # It uses the player 'audio.js' from http://kolber.github.com/audiojs/ | |
| # | |
| # Install the plugin according to the manuel of the author by adding the necessary lines to the head-template | |
| # and adding the files into the right directories. | |
| # | |
| # Please read my [blog post about it][2]. | |
| # |
| <?php | |
| /* | |
| * This file is part of the FOSUserBundle package. | |
| * | |
| * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/> | |
| * | |
| * For the full copyright and license information, please view the LICENSE | |
| * file that was distributed with this source code. | |
| */ |
| <?php | |
| use Doctrine\ORM\Mapping as ORM; | |
| use Doctrine\Common\Collections\ArrayCollection; | |
| /** | |
| * @ORM\Entity() | |
| * @ORM\Table(name="user") | |
| */ | |
| class User |
| DROP TABLE IF EXISTS `attributes`; | |
| CREATE TABLE `attributes` ( | |
| `name` VARCHAR(64) NOT NULL, | |
| PRIMARY KEY (`name`) | |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
| DROP TABLE IF EXISTS `attr_value_pairs`; | |
| CREATE TABLE `attr_value_pairs` ( | |
| `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, | |
| `attr` VARCHAR(64) NOT NULL, |
| #!/usr/bin/env ruby -w | |
| # pnginator.rb: pack a .js file into a PNG image with an HTML payload; | |
| # when saved with an .html extension and opened in a browser, the HTML extracts and executes | |
| # the javascript. | |
| # Usage: ruby pnginator.rb input.js output.png.html | |
| # By Gasman <http://matt.west.co.tt/> | |
| # from an original idea by Daeken: http://daeken.com/superpacking-js-demos |
| watch( '(src/.*\.feature)$' ) {|md| system("./console -e=test behat -fprogress #{md[1]}") } | |
| watch( '(src/.*\.php)$' ) {|md| system("phpunit -c app src") } |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| # | |
| # Capistrano recipe for deploying Drupal7 using git and ssh. | |
| # | |
| # Part of the explanations in the comments taken from: | |
| # http://help.github.com/deploy-with-capistrano/ | |
| # | |
| set :default_environment, { | |
| # This is the $PATH for the deploymant shell. using uberpsace's recent php | |
| # and added ~/bin for drush. |
| <?php | |
| require_once dirname(__DIR__).'/../../../../app/AppKernel.php'; | |
| /** | |
| * Test case class helpful with Entity tests requiring the database interaction. | |
| * For regular entity tests it's better to extend standard \PHPUnit_Framework_TestCase instead. | |
| */ | |
| abstract class KernelAwareTest extends \PHPUnit_Framework_TestCase | |
| { |