Skip to content

Instantly share code, notes, and snippets.

View RandyBooth's full-sized avatar
🏠
Working from home

Randy Booth RandyBooth

🏠
Working from home
View GitHub Profile
@RandyBooth
RandyBooth / .eslintrc
Last active May 14, 2020 17:05
React ESLint
// 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"],
@RandyBooth
RandyBooth / .prettierrc.json
Created May 14, 2020 15:39
JavaScript Prettier
{
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": true
}
@RandyBooth
RandyBooth / new_empty_git_branch.md
Last active April 3, 2020 14:08
New empty git branch
git checkout master
git checkout --orphan foo
git rm --cached $(git ls-files)
#!/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
// 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
@RandyBooth
RandyBooth / paginate-parent-children.php
Created January 18, 2016 22:02 — forked from glueckpress/paginate-parent-children.php
[WordPress] Pagination for a parent page and their child pages.
<?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;

Awesome PHP

A curated list of amazingly awesome PHP libraries, resources and shiny things.

Composer

Composer Related

<h1>H1</h1>
<h2>H2</h2>
<h3>H3</h3>
<h4>H4</h4>
<h5>H5</h5>
[
{
"args": null,
"command": "select_all"
},
{
"args":
{
"set_translate_tabs": true
},
@RandyBooth
RandyBooth / responsive.html
Created January 29, 2012 20:41 — forked from lensco/responsive.html
Simple responsive design test page. More info here: http://bricss.net/post/16538278376/simple-responsive-design-test-page
<!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; }