Skip to content

Instantly share code, notes, and snippets.

View westhouseit's full-sized avatar

Paul vdW westhouseit

  • Westhouse IT Ltd
  • UK
View GitHub Profile
@westhouseit
westhouseit / gist:dd21ac7e1b62e1b122e8150df13c38d6
Created September 29, 2019 20:55 — forked from matoakley/gist:1092571
MySQL to convert a string into a slug
LOWER(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(TRIM('My String'), ':', ''), ')', ''), '(', ''), ',', ''), '\\', ''), '\/', ''), '\"', ''), '?', ''), '\'', ''), '&', ''), '!', ''), '.', ''), ' ', '-'), '--', '-'), '--', '-')) AS `post_name`
#!/bin/bash
#
# Version: 2.0
# Date: 19-01-2015
# Enhanced by: Paul van der Westhuizen
#
# Logmon.sh
# This script is designed to monitor error log files,
# and if any new lines are found, to email these to a chosen address
#
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@westhouseit
westhouseit / .git-ftp-ignore
Created June 28, 2019 11:47
git-ftp-ignore for use with git-ftp
src/*
tools/*
.git*
.babelrc
.editorconfig
.eslintignore
.eslintrc
.stylelintignore
.stylelintrc
composer.lock
@westhouseit
westhouseit / .gitlab-ci.yml
Created June 28, 2019 11:44
Deploy via FTP from GitLab
variables:
STAGE_FTP_HOST: "{hostname or ip}"
deploy_staging:
stage: deploy
environment: Staging
script:
- apt-get update -qq && apt-get install -y -qq git-ftp
# Set user and pass in Gitlab > Settings > CI/CD > Variables