Skip to content

Instantly share code, notes, and snippets.

View padraic's full-sized avatar
💭
Contact me by email. I am temporarily inactive on Github.

Pádraic Brady padraic

💭
Contact me by email. I am temporarily inactive on Github.
View GitHub Profile
@padraic
padraic / survey.php
Last active August 29, 2015 13:56
Enumerating Composer packages for PHPCS analysis and data collection
<?php
define('PACKAGE_LIST', 'list.txt');
define('CODING_STANDARD', 'PSR2');
define('SEVERITY', 1);
define('ENCODING', 'utf-8');
define('REPORT', 'source');
define('EXTENSIONS', 'php');
$excluded = [
'*/test/*',
@mathiasverraes
mathiasverraes / TestFrameworkInATweet.php
Last active May 23, 2022 12:28
A unit testing framework in a tweet.
<?php
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);}
@eko
eko / packagist.py
Last active September 25, 2020 13:39
This is a reverse-search for Packagist in order to find which packages is using a package as a dependency
#!/usr/bin/python
#
# This script will provides a reverse-search on Packagist to find which libraries uses a given library package
# as a dependency.
#
# Usage:
# First, you need to fetch dependencies: ./packagist.py --fetch
# After, you can start checking packages: ./packagist.py --package <package-name>
#
# Author: Vincent Composieux <vincent.composieux@gmail.com>