Skip to content

Instantly share code, notes, and snippets.

View mrqaidi's full-sized avatar

Ayman Qaidi mrqaidi

  • Sharzee LLC
  • Cologne - Germnay
View GitHub Profile
@mrqaidi
mrqaidi / class.php
Created December 16, 2017 02:49 — forked from hlashbrooke/class.php
A complete, versatile options page class for any WordPress plugin
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
class WordPress_Plugin_Template_Settings {
private $dir;
private $file;
private $assets_dir;
private $assets_url;
private $settings_base;
@mrqaidi
mrqaidi / openload.js
Created August 2, 2017 13:34 — forked from Mello-Yello/openload.js
Openload: extract download URL using PhantomJS
// Usage: phantomjs openload.js <video_url>
var separator = ' | ';
var page = require('webpage').create(),
system = require('system'),
id, match;
if(system.args.length < 2) {
console.error('No URL provided');
phantom.exit(1);
@mrqaidi
mrqaidi / GraphicsMagick.sh
Created June 1, 2017 01:42 — forked from boldt/GraphicsMagick.sh
How to install GraphicsMagick on CentOS 6.7
#!/bin/bash
# Install build dependencies
yum install -y gcc libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel
# Get GraphicsMagick source
wget http://skylink.dl.sourceforge.net/project/graphicsmagick/graphicsmagick/1.3.23/GraphicsMagick-1.3.23.tar.gz
tar zxvf GraphicsMagick-1.3.23.tar.gz
# Configure and compile
@mrqaidi
mrqaidi / google-img-resize.mdown
Created March 29, 2017 09:22
Google’s authentication-less on-the-fly image resizing service

Google's authentication-less on-the-fly image resizing service

I found it while poking around the Google+ HTML. Jotting down some notes felt like a good idea, so here goes. If you know more about this API, let me know, please!

(Word of warning: I spent ~30 minutes on both my experimentation and this here write-up, so it might not be the most thought-provoking, brilliant thing you read today.)

@mrqaidi
mrqaidi / class.envato2.php
Created March 1, 2017 19:32 — forked from dtbaker/class.envato2.php
Using the verify-purchase endpoint of the new Envato API to validate a purchase code.
<?php
// NOTE: verify-purchase has been deprecated and it's best to use the new /author/sale endpoint as documented on http://build.envato.com/
// created by Envato user wpdreams https://forums.envato.com/t/verify-purchase-class/3526
// usage example:
$o = EnvatoApi2::verifyPurchase( $purchase_code );
@mrqaidi
mrqaidi / sentora_install.sh
Created November 17, 2016 16:22 — forked from GeoWebDevCom/sentora_install.sh
Installer for Sentora Ubuntu 14.04 with armf compability
#!/usr/bin/env bash
# Official Sentora Automated Installation Script
# =============================================
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#