Skip to content

Instantly share code, notes, and snippets.

View Seldaek's full-sized avatar
😀
😀

Jordi Boggiano Seldaek

😀
😀
View GitHub Profile
@Seldaek
Seldaek / keybase.md
Created March 27, 2014 13:15
Keybase.io proof

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 245D B3BE FBFE F1E7 8689 8686 D7F1 1ADC 1848 487E

To claim this, I am signing this object:

@Seldaek
Seldaek / sort.js
Last active August 29, 2015 14:04
PHP Wiki Vote Chrono-sort
// Run this in web console
var rows = $('table tr').get();
rows.sort(function(a, b) {
var keyA = $(a).find('img[src="/lib/images/success.png"]').attr('title') || '0';
var keyB = $(b).find('img[src="/lib/images/success.png"]').attr('title') || '0';
if (keyA < keyB) return -1; if (keyA > keyB) return 1; return 0;
});
$.each(rows, function(index, row) {$('table tbody').append(row);});
@Seldaek
Seldaek / gist:9047b756ce8aebd9e369
Created March 31, 2015 17:35
php exts required on packagist
aerospike
amqp
aop
apc
apcu
bcmath
bitset
blast
blitz
bz2
@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:
curl -XPOST -v https://packagist.org/api/github --data 'payload={"repository":{"url":"https://github.com/FOO/BAR"}}&apiToken=TOKEN&username=USERNAME'
@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;
},
@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 / 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,
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 / 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