A curated list of amazingly awesome PHP libraries, resources and shiny things.
- Composer/Packagist - A package and dependency manager.
- Composer Installers - A multi framework Composer library installer.
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Responsive Design Testing</title> | |
<style> | |
body { margin: 20px; font-family: sans-serif; overflow-x: scroll; } | |
.wrapper { width: 6000px; } | |
.frame { float: left; } | |
h2 { margin: 0 0 5px 0; } |
[ | |
{ | |
"args": null, | |
"command": "select_all" | |
}, | |
{ | |
"args": | |
{ | |
"set_translate_tabs": true | |
}, |
<h1>H1</h1> | |
<h2>H2</h2> | |
<h3>H3</h3> | |
<h4>H4</h4> | |
<h5>H5</h5> |
A curated list of amazingly awesome PHP libraries, resources and shiny things.
<?php | |
/** | |
* Pagination for a parent page and their child pages. | |
* Use as gp130428_link_pages() in your template file. | |
* Optionally limit to a particular parent page by passing its ID (i.e. 123) to the function: gp130428_link_pages( 123 ) | |
* | |
*/ | |
function gp130428_paginate_parent_children( $parent = null ) { | |
global $post; | |
// Overrides of Select2 SASS variables to make it work with Bootstrap 4 and match its look. | |
// Import this BEFORE https://github.com/select2/select2-bootstrap-theme SASS files or SASS compilation will fail | |
// Since there is no offical Bootstrap 4 theme for Select 2 this is a good fallback. | |
$s2bs-border-radius-base: $border-radius !default; | |
$s2bs-border-radius-large: $border-radius-lg !default; | |
$s2bs-border-radius-small: $border-radius-sm !default; | |
$s2bs-btn-default-bg: $btn-secondary-bg !default; | |
$s2bs-btn-default-border: $btn-secondary-border !default; | |
$s2bs-caret-width-base: .25rem !default; // 4px |
#!/usr/bin/env php | |
<?php | |
echo PHP_EOL; | |
echo 'Running tests...' . PHP_EOL; | |
exec('vendor/bin/phpunit', $output, $returnCode); | |
if ($returnCode !== 0) { | |
// Show full output |
git checkout master
git checkout --orphan foo
git rm --cached $(git ls-files)
{ | |
"trailingComma": "all", | |
"tabWidth": 2, | |
"semi": true, | |
"singleQuote": true | |
} |
// npx install-peerdeps --dev eslint-config-airbnb | |
{ | |
"extends": ["airbnb", "plugin:react/recommended", "plugin:prettier/recommended"], | |
"parser": "babel-eslint", | |
"parserOptions": { | |
"ecmaVersion": 6, | |
"sourceType": "module" | |
}, | |
"plugins": ["react"], |