Skip to content

Instantly share code, notes, and snippets.

View Seldaek's full-sized avatar
😀
😀

Jordi Boggiano Seldaek

😀
😀
View GitHub Profile
@Seldaek
Seldaek / ext-requires.txt
Last active February 15, 2020 18:52
PHP Extension Requirements on Packagist.org
Taken from packagist.org
Packages with a master branch update since June 1st 2018: 98977
Of those, package having requires on PHP extensions: 11676 (11.79%)
As only ~12% of packages declare their extension requirements,
and even then it might not be a complete list, take all this with
a big grain of salt, it is informative but definitely not a
complete picture of the most used extensions.

Keybase proof

I hereby claim:

  • I am seldaek on github.
  • I am seldaek (https://keybase.io/seldaek) on keybase.
  • I have a public key whose fingerprint is 96DC 30A1 E352 6046 F9A1 31E9 C435 9456 C838 78B3

To claim this, I am signing this object:

@Seldaek
Seldaek / foo.php
Created September 30, 2016 08:23
Case-insensitive Classmap
// in POST_AUTOLOAD_DUMP
$map = include('autoload_classmap.php');
// TODO lowercase all keys
file_put_contents('autoload_classmap.php', '<?php return '.var_export($map, 1));
// the above should be done without include ideally to keep the classmap using relative paths,
// but if you don't move the project files around then this is fine.
@Seldaek
Seldaek / potential-squatters.txt
Created June 29, 2016 19:22
Potential Typo-squatters
adam-paterson adampaterson => oauth2-stripe
components component => foundation
#eveseat eve-seat => seat
#frozzare frozzere => wp-admin-menu-tabs
guzzlehttp puzzlehttp => streams
gwis gws => php-valueobjects
ite ice => form-bundle
kcs ucs => utils
laravel larvel => framework
mindy hindy => application, base, cache, console, controller, di, event, exception, helper, http, locale, logger, middleware, orm, query, router, security, session, tests, utils, validation
PHP 5.5.9 11.87
PHP 7.0.6 10.39
PHP 5.6.20 8.41
PHP 5.6.21 7.69
PHP 5.6.19 4.71
PHP 5.6.5 4.18
PHP 5.5.21 3.64
PHP 7.0.4 3.37
PHP 7.0.5 3.15
PHP 5.4.45 2.96
@Seldaek
Seldaek / results.php
Created April 21, 2016 12:33
PHP Ecosystem Scan
This file has been truncated, but you can view the full file.
<?php return array (
'file' =>
array (
'README' => 71549,
'.gitignore' => 56048,
'LICENSE' => 42975,
'.travis.yml' => 27817,
'phpunit.xml.dist' => 14730,
'phpunit.xml' => 12788,
'composer.lock' => 10886,
@Seldaek
Seldaek / composer.json
Created April 11, 2016 15:36
Self-signed SSL composer repo
{
"repositories": [
{
"type": "composer",
"url": "https://toran.example.org",
"options": {
"ssl": {
"cafile": "/path/to/file/with/your/cert.pem"
}
}
@Seldaek
Seldaek / bench.php
Created December 8, 2015 10:33
strtr vs str_replace benchmark
<?php
$jobs = array(
'old/strtr' => function($args) {
$classes = [];
foreach ($args as $class) {
$classes[] = strtr($class, '\\', DIRECTORY_SEPARATOR);
}
return $classes;
},
curl -XPOST -v https://packagist.org/api/github --data 'payload={"repository":{"url":"https://github.com/FOO/BAR"}}&apiToken=TOKEN&username=USERNAME'
@Seldaek
Seldaek / rant.log
Created April 17, 2015 20:54
freenode/#composer rant
03:54 -!- THEBEEFSTEAK has joined #composer
03:54 <THEBEEFSTEAK> hey guyys
03:54 <THEBEEFSTEAK> RobLoach
03:55 <THEBEEFSTEAK> sandvige
03:55 <THEBEEFSTEAK> scottrigby
03:55 <THEBEEFSTEAK> skoop
03:55 <THEBEEFSTEAK> Spea
03:55 <THEBEEFSTEAK> tonton
03:55 <THEBEEFSTEAK> tystr:
03:55 <THEBEEFSTEAK> s+e: