Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Philogene raramuridesign

View GitHub Profile
@ChgoChad
ChgoChad / commands.php
Last active Jul 31, 2020 — forked from escopecz/commands.php
Script to run Mautic (https://mautic.org) commands from a URL.
View commands.php
<?php
if (!isset($_GET['ILoveMautic'])) {
echo 'The secret phrase is wrong.';
die;
}
$link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$allowedTasks = array(
'cache:clear',
@fevangelou
fevangelou / my.cnf
Last active Nov 13, 2020
Optimized my.cnf configuration for MySQL/MariaSQL (on cPanel/WHM servers)
View my.cnf
# === 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.
#
@mbejda
mbejda / Industries.csv
Last active Nov 20, 2020
Compiled list of industries.
View Industries.csv
Industry
Accounting
Airlines/Aviation
Alternative Dispute Resolution
Alternative Medicine
Animation
Apparel/Fashion
Architecture/Planning
Arts/Crafts
Automotive
@escopecz
escopecz / commands.php
Last active Sep 17, 2020 — forked from alanhartless/cron.php
Script to run Mautic (https://mautic.org) commands from a URL.
View commands.php
<?php
if (!isset($_GET['ILoveMauticReallyIDo'])) {
echo 'The secret phrase is wrong.';
die;
}
$link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$allowedTasks = array(
'cache:clear',
View backup-servername.sh
#!/bin/sh
#
# This script is used on a QNAP TS-269 PRO. https://www.en0ch.se/qnap-and-rsync/
#
# You have to change:
# 1. $SHAREUSR
# 2. $EXCLUDES (if you want o change the name of the file servername.excludes)
# 3. $SOURCE & $DESTINATION
# 4. user@yourserver.se for the mysqldump
# 5. --password=SUPERSECRET
View user.sql
INSERT INTO `users` (`id`, `role_id`, `is_published`, `date_added`, `created_by`, `created_by_user`, `date_modified`, `modified_by`, `modified_by_user`, `checked_out`, `checked_out_by`, `checked_out_by_user`, `username`, `password`, `first_name`, `last_name`, `email`, `position`, `timezone`, `locale`, `last_login`, `last_active`, `online_status`, `preferences`)
VALUES
(2, 1, 1, '2015-04-01 15:15:07', 1, 'Nobody', NULL, NULL, NULL, NULL, NULL, NULL, 'madmin', '$2y$13$VkE7UjFetqAM13oT4v/VYOfRCGrJ4hbr0zuwRZo6KVfDnNb16WFwy', 'Administrator', 'Uuser', 'user@local.host', NULL, NULL, NULL, NULL, NULL, 'offline', 'N;');
@seebk
seebk / rsync_backup.py
Last active Nov 4, 2020
Python rsync backup script
View rsync_backup.py
#!/usr/bin/python3
#######################################################
# Python rsync Backup script
# Sebastian Kraft, 24.06.2013
#
#######################################################
#-----------------------------------------------------
# Config
@woogist
woogist / functions.php
Last active Dec 25, 2015
Place in your theme’s functions.php file or custom plugin. Will only allow customers to checkout is their cart total is greater than 50.
View functions.php
add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' );
function wc_minimum_order_amount() {
global $woocommerce;
$minimum = 10;
if ( $woocommerce->cart->get_cart_total() < $minimum ) {
$woocommerce->add_error( sprintf( 'You must have an order with a minimum of %s to place your order.' , $minimum ) );
}
}
View ZA-Province-list
<select name="Provinces" id="Provinces">
<option selected="selected">Please select</option>
<option value="Eastern Cape" id="EasternCape">Eastern Cape</option>
<option value="Free State" id="FreeState">Free State</option>
<option value="Gauteng" id="Gauteng">Gauteng</option>
<option value="KwaZulu-Natal" id="KwaZulu-Natal">KwaZulu-Natal</option>
<option value="Limpopo" id="Limpopo">Limpopo</option>
<option value="Mpumalanga" id="Mpumalanga">Mpumalanga</option>
<option value="Northern Cape" id="NorthernCape">Northern Cape</option>
<option value="North West" id="NorthWest">North West</option>
@2dpi
2dpi / gist:4130110
Created Nov 22, 2012
SEBLOD: Importer readme
View gist:4130110
SEBLOD Importer
========================================
- create/open CSV file (use first row for column titles to make editing easier)
- NB! make sure the following columns exist (id, title, catid)
-- id (joomla core auto increment if not specified)
-- title (if not specified timestamp will be used)
-- catid (set a default category else will be save as uncategorised)
-- OPTIONAL - ADD ANY OTHER ARTICLE COLUMNS
- match existing exclusive columns (i.e. LOCKED -TABLE: cck_store_form_your_content_type - storage [standard - article - field_name])
You can’t perform that action at this time.