This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class PoolSample | |
{ | |
private $_pool = array() | |
/** | |
* Constructor | |
* | |
* @param Array The Pool to Sample - Zero Indexed Array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface INumber | |
{ | |
public function go(); | |
public function setNumber($i); | |
} | |
class FBNumber implements INumber | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from random import choice | |
class Words: | |
list = {} | |
loaded = False | |
def load(self): | |
f = open('/usr/share/dict/words', 'r') | |
for line in f: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random, re | |
from string import join | |
class SpellCheckerTest: | |
vowels = ['a','e','i','o','u'] | |
def pick_words(self): | |
sample = [] | |
f = open('/usr/share/dict/words') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for f in `git diff --cached --name-status --diff-filter=ACM | grep -Ev "^D" | awk '{print $2}' | grep -E "ph(p|tml)" | grep -v "misc/migrations"`; | |
do | |
php-cs-fixer --fixers=-psr0,-phpdoc_params fix $f | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Protec\Stdlib; | |
use \Zend\EventManager\EventManagerInterface; | |
use \Zend\ServiceManager\ServiceLocatorAwareInterface; | |
trait EventManagerAwareTrait | |
{ | |
protected $event_manager; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function slugify($text) | |
{ | |
// Swap out Non "Letters" with a - | |
$text = preg_replace('/[^\\pL\d]+/u', '-', $text); | |
// Trim out extra -'s | |
$text = trim($text, '-'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name "web-server" | |
description "Web Server" | |
run_list "recipe[apt]", | |
"recipe[nginx]", | |
"recipe[php]", | |
"recipe[php-fpm]", | |
"recipe[php::module_mysql]", | |
"recipe[php::module_apc]", | |
"recipe[php::module_intl]", | |
"recipe[php::module_curl]", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Auto-Accept New GA Changes | |
// @namespace http://esl.eu/ | |
// @version 0.1 | |
// @description enter something useful | |
// @match http://www.esl.eu/*/admin_ga_changes/view/* | |
// @copyright 2013+, Martin Meredith | |
// ==/UserScript== | |
if (jQuery(jQuery(jQuery('#main_content table')[1]).find('tr')[3]).find('td')[1].innerHTML == '<em>none</em>') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace ProtecTest\Employment; | |
use \ProtecInnovations\Recruiter; | |
use \PHPUnit_Framework_TestCase as TestCase; | |
class RecruiterTest extends TestCase | |
{ | |
protected $object = null; |
OlderNewer