Skip to content

Instantly share code, notes, and snippets.

View niamrox's full-sized avatar

Niamul Hasan niamrox

View GitHub Profile
initApplyImageLoad: function () {
var $container = $('.site-content');
var $status = $('#status');
var $progress = $('progress');
var supportsProgress = $progress[0] &&
// IE does not support progress
$progress[0].toString().indexOf('Unknown') === -1;
var loadedImageCount, imageCount;
@niamrox
niamrox / gist:32a869041e306f8ef86f5ebbadbbc1f0
Created July 30, 2017 15:33 — forked from mikejolley/gist:1860056
WooCommerce - Override billing fields
add_filter( 'woocommerce_billing_fields', 'custom_woocommerce_billing_fields' );
function custom_woocommerce_billing_fields( $fields ) {
// Over-ride a single label
$fields['billing_first_name']['label'] = 'Your label';
// Over-ride a single required value
$fields['billing_first_name']['required'] = false;

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
<meta name='language' content='ES'>
<meta name='robots' content='index,follow'>
@niamrox
niamrox / vc_map_multipmle_param_select_box.php
Last active July 14, 2017 14:24
Multiple Select Form Based on Dynamic Taxonomy Query
<?php
/*
Element Description: VC Info Box
*/
// Element Class
class ClientInfoBoxLoop extends WPBakeryShortCode
{
// Element Init
@niamrox
niamrox / Media Query Break Points
Last active June 2, 2017 13:57
BS3 - Media Query Break Points
/*==================================================
= Bootstrap 3 Media Queries =
==================================================*/
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
@niamrox
niamrox / gist:102f2a2857b1b00aaf6c71ebbf47ce85
Created April 24, 2017 10:57 — forked from bueltge/gist:757903
This WordPress Plugin demonstrates how you can build your own plugin pages using the WordPress provided draggable metaboxes, requires WordPress 2.7 version, supports WordPress 2.8 changed boxing layout engine
<?php
/*
Plugin Name: HowTo Plugin
Plugin URI:
Description: This Plugin demonstrates how you can build your own plugin pages using the WordPress provided draggable metaboxes, requires WordPress 2.7 version, supports WordPress 2.8 changed boxing layout engine
Author: Heiko, Frank
Author URI: http://bueltge.de
Version: 0.1
License:

Disabling Spotlight in Snow Leopard is pretty easy, launch the Terminal and type the following command:

sudo mdutil -a -i off

This tells the Spotlight manager to disable all indexing on all volumes, the command will require your administrative password to execute.

Re-enabling Spotlight in Mac OS X 10.6 Snow Leopard is just as easy, just reverse the command to:

sudo mdutil -a -i on
Now Spotlight indexing will be back on

@niamrox
niamrox / fix_Locale.md
Last active February 2, 2017 09:46
Class 'Locale' not found

First Follow the steps

  • Open terminal application
  • Enter “which php" and if it says “/usr/bin/php”, then proceed to step 3.
  • Enter: sudo nano ~/.bash_profile
  • Then paste this:
export XAMPP_HOME=/Applications/XAMPP
export PATH=${XAMPP_HOME}/bin:${PATH}
export PATH
sudo rm -rf /Volumes/*/.Trashes