This file contains 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 | |
/* | |
phpcs --standard=PHPUnitStandard TestExample.php | |
52 | ERROR | Private methods are prohibited; found rollSpare | |
57 | ERROR | Private methods are prohibited; found rollMany | |
57 | ERROR | Function's cyclomatic complexity (2) exceeds allowed maximum of | |
| | 1 | |
57 | ERROR | Function's nesting level (1) exceeds allowed maximum of 0 |
This file contains 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
#!/usr/bin/env php | |
<?php | |
$paths = array(); | |
if (isset($_SERVER['argv'])) | |
{ | |
$paths = $_SERVER['argv']; | |
array_shift($paths); | |
if (!$paths) |
This file contains 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 | |
LOG="tee -a /tmp/branch-cleanup.log" | |
git checkout development | |
git fetch | |
git remote prune origin | |
branchlist=`git branch -r --merged development | sed 's/ |
This file contains 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 | |
if [ ! -d "$1" ]; then | |
echo "Usage: "$0" path/to/git/checkout" | |
exit 1 | |
fi | |
cd $1 | |
LOG="tee -a /tmp/branch-cleanup.log" |
This file contains 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
<style type="text/css"> | |
@font-face { | |
font-family: 'Lato'; | |
font-style: normal; | |
font-weight: 700; | |
src: local('Lato Bold'), local('Lato-Bold'), url(fonts/lato-bold.woff) format('woff'); | |
} | |
@font-face { | |
font-family: 'Lato'; |
This file contains 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
/** | |
* Assert that a XPath matches on a DomNode | |
* | |
* Uses the XPath Method boolean() to see if a node test evaluates to true | |
* It's true if one of the follow conditions is met: | |
* | |
* - a number is true if and only if it is neither positive or negative zero nor NaN | |
* - a node-set is true if and only if it is non-empty | |
* - a string is true if and only if its length is non-zero | |
* - an object of a type other than the four basic types is converted to a |
This file contains 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
phpunit.xml.dist: | |
<listeners> | |
<listener class="MemoryTestListener" file="./MemoryTestListener.php"> | |
</listeners> | |
In the same folder: MemoryTestListener.php | |
<?php | |
class MemoryTestListener implements PHPUnit_Framework_TestListener |
This file contains 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: | |
master & 5.4.6 | |
Configure Command => './configure' '--prefix=/opt/php-master' '--without-pear' '--with-zlib' '--with-xsl' '--enable-debug' | |
Repro: | |
------ |
This file contains 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
export PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\[\033[31m\]$(git branch 2>/dev/null|cut -f2 -d\* -s) \[\033[01;34m\]$\[\033[00m\] ' |
This file contains 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 | |
function f() { | |
sleep "$1" | |
echo "$1" | |
} | |
while [ -n "$1" ] | |
do | |
f "$1" & | |
shift | |
done |
OlderNewer