Skip to content

Instantly share code, notes, and snippets.

Feeling great!

Enovision IT & Web Services enovision

Feeling great!
View GitHub Profile
View gist:5c547d0d2be1bb4520f72a738d76aba7
* author: Tres Finocchiaro transposed to PHP by Johan van de Merwe
* date: 2020-08-10
* license: Public Domain; Use as you wish.
* source:
* usage:
* $data = '^XA...your zpl data.. XZ';
enovision / ajax.js
Created Feb 27, 2020 — forked from franz-josef-kaiser/ajax.js
AJAX in WordPress. Class based example.
View ajax.js
( function( $, plugin ) {
"use strict";
// Working with promises to bubble event later than core.
$.when( someObjectWithEvents ).done( function() {
console.log( 'AJAX request done.' );
} )
.then( function() {
setTimeout( function() {
console.log( 'AJAX requests resolved.' );
enovision / Iterate an Ext JS 4 store
Created Jun 11, 2013
Iterating a Ext JS 4 store. How to go through every record of Ext JS store
View Iterate an Ext JS 4 store
In the functoin below you have to find your store
in your own object. If the function below is in a grid class
you can use it as it is put here
I like to keep things clear, therefor I address every object
in a seperate field for clarity.
function IterateThisStore() {
enovision / W2UI Grid Toolbar
Created Jun 6, 2013
W2UI Framework - Toolbar handler. A button click is handled on the toolbar (target = id of the button, data = the event object)
View W2UI Grid Toolbar
name: 'grid',
recordsPerPage: 25,
fixedRecord: false,
url: '/wp-content/plugins/GarageSoftware/ajax/AjaxLoadOccasions.php',
show: {
header: true,
footer: true,
toolbar: true
enovision / unzip.php
Created Mar 1, 2013
Unzip.php - Unzip zip file on the web server faster (see first comment for usage)
View unzip.php
if (isset($_POST['zip_file'])) {
$filename = $_POST['zip_file'];
$source = $_POST['zip_file'];
$type = 'zip';
$name = explode(".", $filename);
$accepted_types = array('application/zip', 'application/x-zip-compressed', 'multipart/x-zip', 'application/x-compressed');
enovision / zipper.php
Created Mar 1, 2013
Script for uploading ZIP file and unzip it on the server (see first comment for usage)
View zipper.php
/* Simple script to upload a zip file to the webserver and have it unzipped
Saves tons of time, think only of uploading Wordpress to the server
Thanks to c.bavota (
I have modified the script a little to make it more convenient
Modified by: Johan van de Merwe (12.02.2013)
function rmdir_recursive($dir) {
foreach (scandir($dir) as $file) {