Skip to content

Instantly share code, notes, and snippets.

module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
@darylldoyle
darylldoyle / google-map-smooth-zoom.js
Created March 8, 2019 17:07
Smooth zooming in and out on Google Maps
/**
* Google Map Smooth Zoom
*
* Zoom in or out smoothly on a Google Map
*/
/**
* This class handles zooming in and out of a map smoothly.
*/
class GoogleMapSmoothZoom {
@darylldoyle
darylldoyle / acf-tab-merge.php
Last active November 7, 2022 01:47
ACF Tab Merge
<?php
/*
Plugin Name: ACF Tab Merge
Plugin URI: https://enshrined.co.uk/2017/06/14/merging-acf-field-group-tabs/
Description: Merges tabs across field groups in ACF
Version: 1.0.0
Author: enshrined
Author URI: https://enshrined.co.uk
*/
@darylldoyle
darylldoyle / autoload.php
Last active November 18, 2022 14:54
PSR-4 Autoload Wordpress
<?php
/**
* An example of a general-purpose implementation that includes the optional
* functionality of allowing multiple base directories for a single namespace
* prefix.
*
* Given a foo-bar package of classes in the file system at the following
* paths ...
*
@darylldoyle
darylldoyle / Gulpfile.js
Created September 17, 2014 15:57
Sourcemaps not working with autoprefixer
var sass = require('gulp-ruby-sass');
var plumber = require('gulp-plumber');
var sourcemaps = require('gulp-sourcemaps');
var postcss = require('gulp-postcss');
gulp.task('sass', function() {
return gulp.src('uncompressed/scss/*.scss')
.pipe(plumber({
errorHandler: onError
}))
@darylldoyle
darylldoyle / adminMaps.js
Created August 1, 2014 16:23
Set zoom level for Advanced Custom Fields map field.
var googleMapsLoaded = false;
var timeout;
if(googleMapsLoaded === false) {
timeout = setInterval("checkVariable()", 500);
}
function doGoogleMapsHook() {
// set current zoom level
var currentZoom = parseInt(jQuery('#acf-field-zoom_level').val());
# Default application configuration that all configurations inherit from.
linters:
BorderZero:
enabled: true
CapitalizationInSelector:
enabled: false
ColorKeyword:
enabled: true
@darylldoyle
darylldoyle / gulpfile.js
Last active December 31, 2022 16:26
Default Gulpfile
// Include gulp
var gulp = require('gulp');
// Include Our Plugins
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var autoprefixer = require('gulp-autoprefixer');
var minifycss = require('gulp-minify-css');