Skip to content

Instantly share code, notes, and snippets.

@zaheeraws
zaheeraws / odeon-to-iPlan
Last active April 3, 2019 10:49
Submit (formcraft) forms information to iPlan | Wordpress plugin
<?php
/*
* Plugin Name: odeon-to-iPlan
* Description: Submit (Contact Form 7) forms information to iPlan
* Version: 1.0
* Author: fieztech <[email protected]>
* Author URI: https://feztech.com
*/
add_action('formcraft_after_save', 'ft_api_to_iPlan', 10, 4);
function ft_api_to_iPlan($content, $meta, $raw_content, $integrations)
apiVersion: v1
kind: PersistentVolume
metadata:
name: mariadb-pv
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
- ReadOnlyMany
apiVersion: v1
kind: PersistentVolume
metadata:
name: wordpress-pv
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
- ReadOnlyMany
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: data-wordpress-mariadb-0
spec:
storageClassName: ""
accessModes:
- ReadWriteOnce
resources:
requests:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: wordpress-wordpress
spec:
storageClassName: ""
accessModes:
- ReadWriteOnce
resources:
requests:
<?php
//sudo apt install php
//sudo apt-get install php-imagick
function backgroundMasking($path)
{
$imagick = new \Imagick(realpath($path));
$backgroundColor = "rgb(255, 255, 255)";
$fuzzFactor = 0.6;
SITE_NAME=
sudo mkdir -p /var/www/{$SITE_NAME}
sudo chown -R pi:www-data /var/www/{$SITE_NAME}
sudo chmod -R 755 /var/www/{$SITE_NAME}
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/{$SITE_NAME}.conf
/**
* Will wait for an iframe to be ready
* for DOM manipulation. Just listening for
* the load event will only work if the iframe
* is not already loaded. If so, it is necessary
* to observe the readyState. The issue here is
* that Chrome will initialize iframes with
* "about:blank" and set its readyState to complete.
* So it is furthermore necessary to check if it's
* the readyState of the target document property.
#!/bin/bash
declare -a DIRS=("tmp" "video_clips" "video_thumbnails", "pdfs", "extracts", "coverage")
DAYS_TO_KEEP=3
BASE_PATH="/home/aviary/current"
BASE_PATH="/Users/mac/Documents/projects/aviary"
DIRS_LIST=${#DIRS[@]}
# @author Usman Javaid <[email protected]>
# @author Zaheer <[email protected]>
#
# Github Action to push the current repo to another repo.
# Note: PR title should be descriptive as it will be used for commit message
# Create a file .github/workflows/sync-repo.yml
# Steps to setup
# 1. Choose the branch/branches against which to trigger this action.
# 2. Create the following Action variables:
# i. TARGET_BRANCH | Branch to push to the other repository.