Skip to content

Instantly share code, notes, and snippets.

View simontechdev's full-sized avatar
💭
SalesPro and API's

SimonTechDev simontechdev

💭
SalesPro and API's
View GitHub Profile
<script>
//watching for changes to the SiteSearch360 plugin search element layer result
// Select the node that will be observed for mutations
const targetNode = document.querySelector('body');
// Options for the observer (which mutations to observe)
const config = { attributes: true, childList: true, subtree: true };
// Callback function to execute when mutations are observed
@simontechdev
simontechdev / .gitignore
Last active May 19, 2023 21:02
Joomla3 and 4 component development site Gitignore
# main root gitignore for Joomla3 and Joomla4 component like a com_myawesomecomponent
*
!*/
!/components/com_myawesomecomponent
!/components/com_myawesomecomponent/**
!/administrator/components/com_myawesomecomponent
!/administrator/components/com_myawesomecomponent/**
#joomla 3# !/administrator/language/en-GB/en-GB.com_myawesomecomponent.ini
@simontechdev
simontechdev / http_headers_security.htaccess
Last active January 10, 2024 20:16 — forked from dkvadratu/http_headers_security.htaccess
{HTACCESS} HTTP headers for security in .htaccess file
# Check your website headers here: https://www.serpworx.com/check-security-headers/ or https://gf.dev/
# This configuration works for WP, WC on LiteSpeed server. Be careful. Test site after installing. All lines are explained are in serpworx.com tester.
# More docs:
# https://www.netsparker.com/whitepaper-http-security-headers/#XFrameOptionsHTTPHeader
# https://owasp.org/www-project-secure-headers/
# https://www.keycdn.com/blog/http-security-headers
# WordPress plugin for Headers setup https://wordpress.org/plugins/http-headers/
# Main security options in .htaccess file:
@simontechdev
simontechdev / my.cnf
Created April 2, 2020 02:17 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaSQL (on cPanel/WHM servers)
# === Optimized my.cnf configuration for MySQL/MariaSQL on cPanel/WHM servers ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated January 2020 ~
#
#
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@simontechdev
simontechdev / innerhtml-to-class
Last active November 16, 2017 00:01
This little snippet simply checks for the presence of certain words and adds them as class names, quick and dirty.
window.addEventListener('load', function() {
var ems=document.getElementsByTagName('em');
for (i=0;i<ems.length;++i) {
ems[i].className = " found";
if (ems[i].innerHTML.includes('auto')){
ems[i].className = ems[i].innerHTML;
}
if (ems[i].innerHTML.indexOf('*commercial*') > -1 || ems[i].innerHTML.indexOf('*business*') > -1){
@simontechdev
simontechdev / anchor-scroll-with-offset.js
Last active August 30, 2016 22:47 — forked from HoundstoothSTL/anchor-scroll-with-offset.js
Anchor scroll with fixed header offset
(function($) {
$(window).load(function() {
$('a[href*=#]:not([href=#])').click(function()
{
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
|| location.hostname == this.hostname)
{
var target = $(this.hash),
headerHeight = $(".primary-header").height() + 5; // Get fixed header height
@simontechdev
simontechdev / 0_reuse_code.js
Created September 27, 2015 04:03
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@simontechdev
simontechdev / index.html
Created June 18, 2013 22:42
A CodePen by TEUCG. Double ring - Single element, pseudo-element animate // variant of http://codepen.io/fixcl/pen/LGntc // Test Animate pseudo-element (SINGLE ELEMENT) / ANIMATE + ELEMENT http://codepen.io/fixcl/pen/anwsG
<!--
autor: TEUCG
https://twitter.com/teucg
-->
<div class="button">TEUCG</div>
@simontechdev
simontechdev / index.html
Created June 18, 2013 22:42
A CodePen by TEUCG. Double ring - Single element, pseudo-element animate // variant of http://codepen.io/fixcl/pen/LGntc // Test Animate pseudo-element (SINGLE ELEMENT) / ANIMATE + ELEMENT http://codepen.io/fixcl/pen/anwsG
<!--
autor: TEUCG
https://twitter.com/teucg
-->
<div class="button">TEUCG</div>