Skip to content

Instantly share code, notes, and snippets.

View manchumahara's full-sized avatar
💭
Life is beautiful!

Sabuj Kundu manchumahara

💭
Life is beautiful!
View GitHub Profile
@manchumahara
manchumahara / google drive picker response
Last active August 29, 2015 14:02
google drive picker response
PDF:
===========================
description ""
embedUrl "https://docs.google.com...PRG-KARZb4gQojr/preview"
iconUrl "https://ssl.gstatic.com...es/icon_10_pdf_list.png"
id "1z75Y9TZ1tE55mEoIxU7Yl8...njuVsdAoPRG-KARZb4gQojr"
lastEditedUtc 1378370893566
mimeType "application/pdf"
name "Buzz-0001.pdf"
@manchumahara
manchumahara / gist:c1ab38508a6e4ff31c38
Last active August 29, 2015 14:05
adding visual editor to kazzo template wordpress plugin
function Kazoo_TemplateEDIT($id) {
global $wpdb;
$r = null;
if ($id > 0) {
$q = "SELECT id,name,date,code FROM kazoo_tpl WHERE id=$id";
$r = $wpdb->get_row($q,OBJECT);
}
//usages [add_to_cart_variable]
add_shortcode('add_to_cart_variable', 'add_to_cart_variable_function');
function add_to_cart_variable_function(){
global $product;
// Enqueue variation scripts
<div class="span12">
<div class="hero-unit">
<h2>Give Your Visitors all Social Media Updates Without Leaving Your Joomla Site</h2>
<h3><img class="alignleft wp-image-1124" title="My Social Timeline for Joomla" src="http://localhost/codeboxr2/wp-content/uploads/2012/05/social-timeline-codeboxr.png" alt="My Social Timeline" width="200" height="200" /> An unique Joomla Component which show latest updates from all major social networks in Facebook like timeline fashion (and other layout and styles). Whichever is your social network of choice, now you can feature their updates as you like within your Joomla! A must have Component.</h3>
[cbdemourl] [cbjedurl] [cbversion] [cbjversion] <a class="btn btn-info" href="http://localhost/codeboxr2/documentation-for-my-social-timeline.html" target="_blank"><span style="color: white;">Documentation</span></a>
</div>
<div class="row-fluid">
<div class="span4">
<h2><i class="icon-thumbs-up "></i> Awesome Features</h2>
'ALL' => 'Albania Lek',
'AFN' => 'Afghanistan Afghani',
'ARS' => 'Argentina Peso',
'AWG' => 'Aruba Guilder',
'AUD' => 'Australia Dollar',
'AZN' => 'Azerbaijan New Manat',
'BSD' => 'Bahamas Dollar',
'BBD' => 'Barbados Dollar',
'BDT' => 'Bangladeshi Taka',
'BYR' => 'Belarus Ruble',
@manchumahara
manchumahara / gist:67d4e2da11a7b49b3f8a
Last active May 14, 2018 09:21
Adding Price in WooCommerce New Customer Order Email Subject
//woocommerce documentaiton http://docs.woothemes.com/document/change-email-subject-lines/
add_filter('woocommerce_email_subject_new_order', 'cbwoocommerce_neworder_email_subject', 1, 2);
/**
* @param $subject
* @param $order
*
* @return string
*/
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@manchumahara
manchumahara / gist:672d5cc5028109fd9e6c
Created June 5, 2015 07:10
wordpress inline js enqueue
//http://wordpress.stackexchange.com/a/139530/6343
/**
* Enqueue inline Javascript. @see wp_enqueue_script().
*
* KNOWN BUG: Inline scripts cannot be enqueued before
* any inline scripts it depends on, (unless they are
* placed in header, and the dependant in footer).
*
* @param string $handle Identifying name for script
@manchumahara
manchumahara / gist:81c60c90d03678a1964c
Last active August 7, 2019 19:58
CBX Dynamic Sidebar for WordPress
<?php
//http://wpboxr.com/product/cbx-dynamic-sidebar-for-wordpress
if(function_exists('cbxdynamicsidebar_display')){
$sidebar_id = 'sidebar post id here';
$config_array = array(
'id' => $sidebar_id,
'wclass' => 'cbxdynamicsidebar_wrapper',
'wid' => 'cbxdynamicsidebar_wrapper',
// Gruntfile.js
// our wrapper function (required by grunt and its plugins)
// all configuration goes inside this function
module.exports = function(grunt) {
'use strict';
// ===========================================================================
// CONFIGURE GRUNT ===========================================================
// ===========================================================================