Skip to content

Instantly share code, notes, and snippets.

@shoreline-chrism
shoreline-chrism / commercial-sections.html
Last active March 5, 2024 18:14
Flick Pest Site Options
Integrated Pest Management Solutions
Our Integrated Pest Management program uses the latest technology focusing on prevention and addressing the root of the causes of pest problems to ensure a pest free environment for commercial workplaces and facilities. Our solutions are tailored to proactively prevent and help mitigate the impact and risk of a pest infestation. We combine tailored multi-faceted solutions with our latest digital pest technology supported by our highly regulated experienced team of technicians to bring you the best in pest control. Let us create a customised plan for your workplace today.
Learn more <a href="#form">here</a> or [phone_link].
case_study_MainImage.jpg
DIY-vs-Professional-scaled.jpg
----
@shoreline-chrism
shoreline-chrism / shoreline-text-to-li.php
Created April 7, 2021 18:43
Convert text on separate lines to <li> items. Useful for custom fields where you want the user to input things on separate lines, but want them as a bullet list on frontend. In ACF, set the field type to 'wysiwyg' and use get_field() to get the text without HTML formatting by passing false to last argument.
<?php
// Convert text on separate lines to li items
if ( !function_exists( 'sl9_text_to_li' ) ) {
function sl9_text_to_li( $text ) {
global $shortcode_tags;
$pattern =
'/'
. '((?!\R).+\R?)' // All lines of text
@shoreline-chrism
shoreline-chrism / input.scss
Created February 4, 2021 19:39
Generated by SassMeister.com.
// .sl9-contain {
// max-width: 85.71429rem;
// width: 100%;
// }
@mixin sl9-contain() {
max-width: 85.71429rem;
width: 100%;
}
@shoreline-chrism
shoreline-chrism / input.scss
Created February 4, 2021 19:36
Generated by SassMeister.com.
.sl9-contain {
max-width: 85.71429rem;
width: 100%;
}
.new-container,
.any-container,
main {
@extend .sl9-contain;
}
@shoreline-chrism
shoreline-chrism / README.md
Last active January 14, 2021 15:39
Gulp extract SVGs from Spritesheet with gulp

Yarn

yarn global-add gulp-cli
yarn add --dev gulp-cheerio

Node

npm install -g gulp-cli
npm add --save-dev gulp-cheerio
@shoreline-chrism
shoreline-chrism / update-plugin-on-wpe.sh
Created December 18, 2020 16:20
Update plugin on WPE install
#!/bin/bash
# To update multiple installs, sepearate the install names by spaces when prompted
read -p "WPE Install Name(s) (separate by spaces): " WPE_INSTALL
# Convert to array
WPE_INSTALL=( $WPE_INSTALL )
read -p "Plugin slug (ie: contact-form-7): " PLUGIN_SLUG
@shoreline-chrism
shoreline-chrism / optimize-convert-mp4-videos.sh
Last active September 15, 2021 19:34
Optimize and convert MP4 videos to webm and mp4
#!/bin/bash
read -e -p 'Filename: ' filename
#Get extension and filename
originalfilename="$filename"
extension="${filename##*.}"
filename="${filename%.*}"
scale="1280:720"
@shoreline-chrism
shoreline-chrism / jQuery OO Template.md
Last active August 25, 2020 14:07
jQuery OO Template-- use to create new jQuery plugin
@shoreline-chrism
shoreline-chrism / convert-to-webm-mp4.sh
Created August 14, 2020 17:18
Convert and optimize source video file to web ready webm and mp4
#!/bin/bash
# Optimize and optionally downsize videos to WEBM and MP4
# Requires ffmpeg installed in your PATH or in CWD
read -e -p "Source file: " SOURCE
read -e -p "Output filename base: " OUTPUTBASE
read -p 'Video width (no px): ' -e -i '1280' VIDEOWIDTH
read -p 'Video height (no px): ' -e -i '720' VIDEOHEIGHT
@shoreline-chrism
shoreline-chrism / event-ticket-plugins-disable-updates.php
Last active June 22, 2017 20:56
Disable updates for event-tickets and event-tickets plus plugins in Wordpress. These plugins should be in-sync and since the plus version is paid it doesn't auto update like event-tickets plugin.
<?php
/**
* The event-tickets and event-tickets-plus plugins must be in-sync and the same
* version number, so let's not update event-tickets plugin unless our paid plugin
* is later than 4.2.7
*
* https://gist.github.com/shoreline-chrism/f8e172178e47e7a12c3ca318a6f4f7d5
*
*/