Skip to content

Instantly share code, notes, and snippets.

Matt Banks mattbanks

Block or report user

Report or block mattbanks

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mattbanks
mattbanks / package.json
Last active Mar 12, 2018
base package.json for jest and eslint
View package.json
{
"name": "project-name",
"description": "project description",
"author": "Matt Banks <email@here.com>",
"version": "1.0.0",
"repository": {
"type": "git",
"url": "project-url-here"
},
"scripts": {
@mattbanks
mattbanks / .editorconfig
Created Mar 12, 2018
base editorconfig
View .editorconfig
# EditorConfig coding styles definitions. For more information about the
# properties used in this file, please see the EditorConfig documentation:
# http://editorconfig.org/
# indicate this is the root of the project
root = true
[*]
charset = utf-8
end_of_line = lf
View jest.config.js
module.exports = {
// collectCoverage: true,
// collectCoverageFrom: [
// 'app/**/*.js'
// ],
testResultsProcessor: 'jest-junit',
};
View .eslintrc
{
"extends": [
"airbnb-base",
"prettier"
],
"parserOptions": {
"ecmaVersion": 8,
"ecmaFeatures": {
"classes": true
}
View .hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
View _grid.scss
/* ==========================================================================
Grid
========================================================================== */
$pad: 20px;
.grid {
margin: 0 0 $pad 0;
@include clearfix();
}
@mattbanks
mattbanks / Contract Killer 3.md
Created Mar 7, 2016 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: October 8th 2015
  • Original post

@mattbanks
mattbanks / 0_reuse_code.js
Created Sep 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mattbanks
mattbanks / gist:55c990b1d5b517ccf043
Created Jun 3, 2015
TextExpander 5 snippet for a new WP_Query wrapped in a transient
View gist:55c990b1d5b517ccf043
// Get any existing copy of our transient data
if ( false === ( $%filltext:name=Query Name:default=myquery% = get_transient( '%filltext:name=Query Name:default=myquery%' ) ) ) {
// It wasn't there, so regenerate the data and save the transient
$%filltext:name=Query Name:default=myquery%_args = array(
'post_type' => '%filltext:name=Post Type:default=post%',
'order' => '%fillpopup:name=Order:default=ASC:DESC%',
'orderby' => '%fillpopup:name=Orderby:default=date:ID:rand:title:author:menu_order%',
'post_status' => 'publish',
'posts_per_page' => %filltext:name=Posts Per Page:default=-1%
@mattbanks
mattbanks / index.php
Created Aug 5, 2014
Awful loop usage in WordPress theme index.php
View index.php
<?php global $wp_query;
query_posts(
array_merge(
$wp_query->query,
array(
'orderby' => 'post_date',
'order' => 'desc'
)
)
);
You can’t perform that action at this time.