Skip to content

Instantly share code, notes, and snippets.



  • Barcelona
View GitHub Profile
NadirZenith / nginx.default.conf
Created May 26, 2017 — forked from santoshachari/nginx.default.conf
PHP5.6 and NGINX: Install PHP56-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
View nginx.default.conf
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and php56-FPM
sudo yum install -y nginx php56-fpm
# Install php56 extensions
sudo yum install -y php56-devel php-mysql php56-pdo php56-pear php56-mbstring php56-cli php56-odbc php56-imap php56-gd php56-xml php56-soap
NadirZenith / php-html-css-js-minifier.php
Created Jan 10, 2017 — forked from taufik-nurrohman/php-html-css-js-minifier.php
PHP Function to Minify HTML, CSS and JavaScript
View php-html-css-js-minifier.php
// Based on <>
define('MINIFY_STRING', '"(?:[^"\\\]|\\\.)*"|\'(?:[^\'\\\]|\\\.)*\'');
define('MINIFY_COMMENT_CSS', '/\*[\s\S]*?\*/');
define('MINIFY_COMMENT_HTML', '<!\-{2}[\s\S]*?\-{2}>');
define('MINIFY_COMMENT_JS', '//[^\n]*');
define('MINIFY_PATTERN_JS', '\b/[^\n]+?/[gimuy]*\b');
define('MINIFY_HTML', '<[!/]?[a-zA-Z\d:.-]+[\s\S]*?>');
View wp-query-ref.php
* WordPress Query Comprehensive Reference
* Compiled by luetkemj -
* Source:
$args = array(
NadirZenith / 0_reuse_code.js
Created Jul 11, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View kint_log.php
require_once __DIR__ . '/vendor/autoload.php';
define('KINT_LOG', '/vagrant/logs/kint.log.html');
* Logs Kint::dump() to file
function l()
NadirZenith / nz-wp-image-upload-back
Created Apr 21, 2014
upload images from front end
View nz-wp-image-upload-back
$mime = array("image/jpg", "image/jpeg", "image/png");
$uploads = wp_upload_dir();
$upload_files_url = array();
foreach ($_FILES['files']['name'] as $key => $value_data) {
$errors_founds = '';
if ($_FILES['files']['error'][$key] != UPLOAD_ERR_OK)
$errors_founds .= 'Error uploading the file!<br />';
You can’t perform that action at this time.