Skip to content

Instantly share code, notes, and snippets.

View AV4TAr's full-sized avatar

Diego Sapriza AV4TAr

View GitHub Profile
<?php
class Importer
{
private $json_array;
private $table;
private $db_config;
public function __construct($db_config)
{
<?php
class AbstractManagerBase extends \PHPUnit_Framework_TestCase
{
protected function getEmMock()
{
$emMock = $this->getMock('\Doctrine\ORM\EntityManager',
array('getRepository', 'getClassMetadata', 'persist', 'flush'), array(), '', false);
$emMock->expects($this->any())
->method('getRepository')

Awesome PHP

A curated list of amazingly awesome PHP libraries, resources and shiny things.

Composer

Composer Related

[ ℠ ] Service Mark [number: &8480]
[ ℃ ] Celsius [number: &8451;]
[ ℅ ] care of [number: &8453;]
[ ℉ ] Fahrenheit [number: &8457;]
[ № ] numero symbol – number sign [number: &8470;]
[ ℗ ] Sound Recording Copyright [number: &8471;]
[ ℞ ] Prescription Take pharmaceutical symbol [number: &8478;]
[ Ω ] Ohm [number: &8486;]
[ ℧ ] Inverted Ohm [number: &8487;]
[ ☀ ] sunshine – sun [ number: &9728;]
@AV4TAr
AV4TAr / pr.md
Created August 26, 2013 00:51 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@AV4TAr
AV4TAr / gist:5731236
Last active December 18, 2015 05:18
<?php
Class Pepe
{
protected $loaded;
public function __construct()
{
$that = $this;
$this->loaded = function () use ($that) {
<?php
$handler = new MySessionHandler();
session_set_save_handler($handler, true);
session_start();