Skip to content

Instantly share code, notes, and snippets.

View chrisjimallen's full-sized avatar

Chris Allen chrisjimallen

View GitHub Profile
<item>
<title>
<![CDATA[ Lactate Pro 2 Test Strips ]]>
</title>
<link>
https://www.habdirect.co.uk/product/lacate-pro-2-test-strips/
</link>
<g:ID>woocommerce_gpf_10724</g:ID>
<g:item_group_id>woocommerce_gpf_10724</g:item_group_id>
<description>
let mix = require('laravel-mix')
mix.js([
'node_modules/bootstrap/dist/js/bootstrap.bundle.min.js',
'node_modules/skip-link-focus/skip-link-focus.min.js',
'node_modules/@fortawesome/fontawesome-free/js/regular.js',
'node_modules/@fortawesome/fontawesome-free/js/brands.js',
'node_modules/@fortawesome/fontawesome-free/js/fontawesome.js',
'src/js/app.js',
], './js/app.js')
@chrisjimallen
chrisjimallen / webpack.config.js
Created April 12, 2018 13:25
Basic Webpack 4 starter. This will build images, sass & js.
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const CleanWebpackPlugin = require('clean-webpack-plugin')
const autoprefixer = require('autoprefixer')
const path = require('path')
module.exports = {
// Set entry & output paths
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'assets'),
@chrisjimallen
chrisjimallen / README.md
Created January 21, 2018 19:59 — forked from developit/ README.md
Webpack Starter Template

Webpack Starter Template

This is a basic Webpack project template for a web app written in ES6 & LESS.

This assumes you have a directory structure as follows:

package.json
webpack.config.js
src/
<?php
function theme_enqueue_styles() {
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'avada-stylesheet' ) );
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function avada_lang_setup() {
$lang = get_stylesheet_directory() . '/languages';
load_child_theme_textdomain( 'Avada', $lang );
@chrisjimallen
chrisjimallen / docker-compose.yaml
Created March 3, 2017 18:40
Browsersync working in docker container.
version: '2'
services:
wordpress:
image: wordpress
expose:
- 80
environment:
WORDPRESS_DB_PASSWORD: example
@chrisjimallen
chrisjimallen / usage.sql
Last active October 27, 2015 13:32
Show Database Size & Usage
SELECT s.schema_name,
CONCAT(IFNULL(ROUND((SUM(t.data_length)+SUM(t.index_length))/1024/1024,2),0.00),"Mb") total_size,
CONCAT(IFNULL(ROUND(((SUM(t.data_length)+SUM(t.index_length))-SUM(t.data_free))/1024/1024,2),0.00),"Mb") data_used,
CONCAT(IFNULL(ROUND(SUM(data_free)/1024/1024,2),0.00),"Mb") data_free,
IFNULL(ROUND((((SUM(t.data_length)+SUM(t.index_length))-SUM(t.data_free))/((SUM(t.data_length)+SUM(t.index_length)))*100),2),0) pct_used
FROM INFORMATION_SCHEMA.SCHEMATA s, INFORMATION_SCHEMA.TABLES t
WHERE s.schema_name = t.table_schema
GROUP BY s.schema_name
ORDER BY total_size DESC
@chrisjimallen
chrisjimallen / functions.php
Created July 9, 2015 08:13
Customise WP-Login Logo
function my_login_logo_url() {
return home_url();
}
function my_login_logo_url_title() {
return 'Your Title';
}
function my_login_logo() { ?>
<style type="text/css">
@chrisjimallen
chrisjimallen / keymap.cson
Created June 24, 2015 11:21
atom soft-wrap
'atom-text-editor':
'cmd-shift-w': 'editor:toggle-soft-wrap'
//colored elements
$header-color: #222;
$button-color: #368a55;
$button-text-color: #fff;
$progress-bar-color: #43AC6A;
$footer-link-color: #0078a0;
// body same as header
$body-color: $header-color;