Skip to content

Instantly share code, notes, and snippets.

View cordoval's full-sized avatar

Luis Cordova cordoval

View GitHub Profile
// ==UserScript==
// @name Adds Labels on Github Pull Request
// @namespace http://fabien.potencier.org
// @include https://github.com/*/*/pulls*
// @version 2
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// ==/UserScript==
$(function() {
$(".pulls-list .list-group-item h4").each(function() {
var pull_request = this;
<?php
namespace Dash\ApplicationBundle\ServiceAdapter;
use Vespolina\Entity\Invoice\Item;
use Vespolina\Entity\Partner\Partner;
use Vespolina\Sync\ServiceAdapter\AbstractServiceAdapter;
use Vespolina\Sync\Entity\EntityData;
# FOS Rest
fos_rest:
param_fetcher_listener: true
body_listener: true
format_listener:
rules:
path: ~
host: ~
priorities:
name: [json, html]
#include <stdio.h>
int f0(unsigned int x) { return x? (x&(1<<31)? f1(x<<1) : f0(x<<1)) : 1; }
int f1(unsigned int x) { return x? (x&(1<<31)? f3(x<<1) : f2(x<<1)) : 0; }
int f2(unsigned int x) { return x? (x&(1<<31)? f0(x<<1) : f4(x<<1)) : 0; }
int f3(unsigned int x) { return x? (x&(1<<31)? f2(x<<1) : f1(x<<1)) : 0; }
int f4(unsigned int x) { return x? (x&(1<<31)? f4(x<<1) : f3(x<<1)) : 0; }
int t0(unsigned int x) { return x? (x&(1<<31)? t1(x<<1) : t0(x<<1)) : 1; }
int t1(unsigned int x) { return x? (x&(1<<31)? t0(x<<1) : t2(x<<1)) : 0; }
int t2(unsigned int x) { return x? (x&(1<<31)? t2(x<<1) : t1(x<<1)) : 0; }
#!/usr/bin/env bash
# finds all sprint tags (like @sprint:42) and runs them in a reversed order (won't run not tagged scenarios)
PARALLEL_COMMAND='parallel --gnu --keep-order'
#PARALLEL_COMMAND='xargs -r -I{}'
BEHAT_COMMAND='./bin/behat --ansi --tags={}'
grep -m 1 '@sprint:' features/*.feature | sed -e 's/.*\(@sprint:[0-9]\+\).*/\1/' | sort -ur | $PARALLEL_COMMAND $BEHAT_COMMAND
<?php
namespace Ibms\JobBundle\Controller;
class JobController extends BaseJobController
{
/**
* Job list.
*
* @param \Symfony\Component\HttpFoundation\Request $request
@cordoval
cordoval / pthreads.md
Created September 28, 2013 10:38 — forked from krakjoe/pthreads.md

Multi-Threading in PHP with pthreads

A Brief Introduction to Multi-Threading in PHP

  • Foreword
  • Execution
  • Sharing
  • Synchronization
  • Pitfalls
<?php
Trait MethodDelegator
{
private $roles = array();
private $method_map = array();
public function delegate($class)
{

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:

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.