Skip to content

Instantly share code, notes, and snippets.

View Spea's full-sized avatar
💻
Coding

Martin Parsiegla Spea

💻
Coding
View GitHub Profile
@Spea
Spea / comparison.php
Created May 24, 2018 16:25
Comparison explanation
<?php
class NameValuePair
{
public $name;
public $value;
public function __construct($name, $value)
{
$this->name = $name;
@Spea
Spea / wowtoken.php
Created April 27, 2015 19:39
Get wow token price
<?php
$price = getTokenPrice();
function getTokenPrice($region = 'EU')
{
$filename = 'wowtoken.json';
if (file_exists($filename) && filemtime($filename) > time() - 1200) {
$content = file_get_contents($filename);
} else {
@Spea
Spea / keybase.md
Created July 9, 2014 14:09
keybase.md

Keybase proof

I hereby claim:

  • I am spea on github.
  • I am spea (https://keybase.io/spea) on keybase.
  • I have a public key whose fingerprint is 7535 57EA 915C 1E98 4959 93EF 57C2 5655 0E05 33ED

To claim this, I am signing this object:

@Spea
Spea / User.php
Created January 2, 2013 17:29
Test All validation constraint (symfony2)
<?php
namespace Acme\DemoBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* User
@Spea
Spea / README.md
Created May 10, 2012 20:49
Script to auto reply emails.

General

This script can be used in conjunction with the ISPmail tutorial and the Roundcube autoreply plugin

Installation

Database setup

Create the following table in the database where you created the tables from the ISPmail tutorial.

@Spea
Spea / deps
Created April 24, 2012 13:05
Gelf handler implementation for Symfony 2.0
[monolog]
git=http://github.com/Seldaek/monolog.git
version=1.1.0
[gelf-php]
git=http://github.com/mlehner/gelf-php.git
version=v1.0