Skip to content

Instantly share code, notes, and snippets.

View AV4TAr's full-sized avatar

Diego Sapriza AV4TAr

View GitHub Profile
[ ℠ ] 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();
CREATE TABLE `session` (
`id` char(32),
`name` char(32),
`modified` int,
`lifetime` int,
`data` text,
PRIMARY KEY (`id`, `name`)
);

Awesome PHP

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

Composer

@AV4TAr
AV4TAr / Module.php
Created June 4, 2013 20:01
Loguear todos los eventos de ZF2 al error_log
<?php
class Module {
//...
public function onBootstrap(EventInterface $e)
{
//...
$eventManager = $e->getApplication()->getEventManager();
$sharedEventManager = $eventManager->getSharedManager();
<?php
return array(
'zenddevelopertools' => array(
/**
* General Profiler settings
*/
'profiler' => array(
/**
* Enables or disables the profiler.
*
<VirtualHost *:80>
...
ProxyPass /api http://127.0.0.1:28017
ProxyPassReverse /api http://127.0.0.1:28017
<Directory "FOLDER">
...
</Directory>
</VirtualHost>