Skip to content

Instantly share code, notes, and snippets.

View charrismatic's full-sized avatar
☝️
Life is Code

Matt Harris charrismatic

☝️
Life is Code
View GitHub Profile
@charrismatic
charrismatic / wp_config_template.php
Last active April 10, 2018 18:56
Advanced Wordpress WP-Config.php Template
<?php
/**
* Custom WordPress configurations on "wp-config.php" file.
*
* This file has the following configurations: MySQL settings, Table Prefix, Secret Keys, WordPress Language, ABSPATH and more.
* For more information visit {@link https://codex.wordpress.org/Editing_wp-config.php Editing wp-config.php} Codex page.
* Created using {@link http://generatewp.com/wp-config/ wp-config.php File Generator} on GenerateWP.com.
*
* @package WordPress
* @generator GenerateWP.com
@charrismatic
charrismatic / ansi-color.php
Created April 10, 2018 22:53 — forked from superbrothers/ansi-color.php
ANSI color terminal output module for php
<?php
/**
* php-ansi-color
*
* Original
* https://github.com/loopj/commonjs-ansi-color
*
* @code
* <?php
* require_once "ansi-color.php";
@charrismatic
charrismatic / README.md
Last active June 25, 2019 10:18
Styleguide Template Template

Styleguide Template Template

Template for Styleguide Template

A Pen by Matt Harris on CodePen.

License.

A simple single-page styleguide template to get started with theming and/or documenting your styles.

@charrismatic
charrismatic / .eslintrc
Created May 3, 2018 16:24 — forked from alefteris/.eslintrc
ESLint default config in YAML format
---
parser: espree
env:
amd: false
browser: false
es6: false
jasmine: false
jquery: false
meteor: false
mocha: false
@charrismatic
charrismatic / simple_args_parsing.sh
Created August 17, 2018 05:37 — forked from jehiah/simple_args_parsing.sh
a simple way to parse shell script arguments
#!/bin/sh
#
# a simple way to parse shell script arguments
#
# please edit and use to your hearts content
#
ENVIRONMENT="dev"
@charrismatic
charrismatic / AAA_README.example.md
Last active October 22, 2018 19:33 — forked from jxson/README.md
README.md template

Always Add A Readme

Backers on Open Collective Sponsors on Open Collective standard-readme compliant

Standard Readme Style

Your README file is normally the first entry point to your code. It should tell people why they should use your module, how they can install it, and how they can use it. Standardizing how you write your README makes creating and maintaining your READMEs easier. Great documentation takes work!

This repository contains:

@charrismatic
charrismatic / standard_format_fixers__unix.md
Last active October 18, 2018 06:07 — forked from watson/README.md
A list of search and replace unix commands to help make a node repository 'standard' compliant

The standard code style linter is a great tool by Feross - check it out!

Remove trailing semicolons:

find . -path ./node_modules -prune -o -type f -name '*.js' -exec sed -i '' -e 's/;$//' {} \;

Ensure space between function and opening bracket:

// THE URL FOR THE MAIN INSTAGRAM IMAGE DOES NOT TRIGGER THE DOWNLOAD EVENT
// INSTEAD IT OPENS THE IMAGE IN A NEW TAB
// RUNNING THE SCRIPT THE SECOND TIME TRIGGERS THE DOWNLOAD EVENT
// KEYBOARD SHORTCUT MAKES THIS TWO STEP PROCESS VERY QUICK
// Step 1: `ctrl`+`shift`+`i` -> `ctrl`+`enter`
// Step 2: `ctrl`+`enter`
var filename = '';
var target = '';
@charrismatic
charrismatic / _mixin_widths.scss
Created April 21, 2019 03:21
SASS Media Query Mixins Example
////
/// @group layout
////
///
/// @name max_width
/// @description Insert media content when less than target width
/// @param {number} $width [max width value]
@mixin max_width($width) {
@media screen and (max-width: #{$width}) {
@charrismatic
charrismatic / README.md
Created April 22, 2019 04:58 — forked from yang-wei/README.md
ES6 destructing (and rest parameter)

We will first discussed how destructing and rest parameters can be used in ES6 - in arrays and objects. Then we will look at a few examples and also discuss some quiz.

arrays

var array = [1, 2, 3, 4];
var nestedArray = [1, 2, 3, 4, [7, 8, 9]];

var [a, b, c, d] = array;
console.log(a, b, c, d)