Skip to content

Instantly share code, notes, and snippets.

View prosenjit-manna's full-sized avatar
🎯
Focusing

Prosenjit Manna prosenjit-manna

🎯
Focusing
  • Itobuz Technologies
View GitHub Profile
@prosenjit-manna
prosenjit-manna / index.html
Last active October 30, 2015 05:08 — forked from anonymous/index.html
Custom SelectBox
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
body {
background:#aaa;
@prosenjit-manna
prosenjit-manna / main.js
Last active November 20, 2015 05:02
Main JS coding style
'use strict';
// jQuery No Conflict
$.noConflict();
(function( $ ) {
//
var app = {
@prosenjit-manna
prosenjit-manna / .jshintrc.js
Created November 27, 2015 08:11 — forked from connor/.jshintrc.js
jshintrc example
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
@prosenjit-manna
prosenjit-manna / angularjs-providers-explained.md
Created November 27, 2015 10:37 — forked from demisx/angularjs-providers-explained.md
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@prosenjit-manna
prosenjit-manna / functions.options.php
Created December 1, 2015 11:51 — forked from Firestorm-Graphics/functions.options.php (smof)
Dynamic sidebars for use with ( custom metaboxes & fields for wordpress, https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress) along with smof options panel or options far,work by devin - Allows you to select how many automatically generated sidebars you want & select the sidebar of your choice per page from a metabox (cmb meta…
/* Author: Dan Beaven
* Company: Firestorm Graphics
* Web: http://firestorm-graphics.com
*/
* Released under the GPL license
* http://www.opensource.org/licenses/gpl-license.php
*
* This is an add-on for WordPress
* http://wordpress.org/
*
@prosenjit-manna
prosenjit-manna / woocommerce-custom-cart-item-data.php
Created December 5, 2015 09:38 — forked from RadGH/woocommerce-custom-cart-item-data.php
Get and set custom cart item/product information prior to WooCommerce checkout, and carry those valus over to Order Item Metadata.
<?php
/*
Instructions:
1) Save data when adding to cart
When adding an item to your cart, use ld_woo_set_item_data. The best action for this to occur is
"woocommerce_add_to_cart". The first parameter for this action contains the "cart_item_key",
which is required for the function.
@prosenjit-manna
prosenjit-manna / How To Hide The Select Arrow On Firefox.md
Created December 9, 2015 09:47 — forked from joaocunha/How To Hide The Select Arrow On Firefox.md
How to hide <select> dropdown's arrow in Firefox when using "-moz-appearance: none;".

This is no longer a bug. I'm keeping the gist for historical reasons, as it helped to get it fixed. Make sure to read the notes by the end of the post.

How to remove hide the select arrow in Firefox using -moz-appearance:none;

TL;DR (or, the fix)

  1. Set -moz-appearance to none. This will "reset" the styling of the element;
  2. Set text-indent to 0.01px. This will "push" the text a tiny bit[1] to the right;
@prosenjit-manna
prosenjit-manna / README.md
Created December 14, 2015 10:27 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@prosenjit-manna
prosenjit-manna / gist:05bfc25c3e5dc0183c2e
Created December 23, 2015 05:08 — forked from corsonr/gist:9152652
WooCommerce : add custom fields to product variations
<?php
//Display Fields
add_action( 'woocommerce_product_after_variable_attributes', 'variable_fields', 10, 3 );
//JS to add fields for new variations
add_action( 'woocommerce_product_after_variable_attributes_js', 'variable_fields_js' );
//Save variation fields
add_action( 'woocommerce_process_product_meta_variable', 'save_variable_fields', 10, 1 );
/**
@prosenjit-manna
prosenjit-manna / CustomWidgetFile.php
Created January 16, 2016 03:55 — forked from jonathonbyrdziak/CustomWidgetFile.php
EMPTY WIDGET Plugin code to create a single widget in wordpress.
<?php
/**
* Duplicate this file as many times as you would like, just be sure to change the
* Empty_Widget class name to a custom name of your choice. Have fun! redrokk.com
*
* Plugin Name: Empty Widget
* Description: Single Widget Class handles all of the widget responsibility, all that you need to do is create the html. Just use Find/Replace on the Contact_RedRokk_Widget keyword to rebrand this class for your needs.
* Author: RedRokk Interactive Media
* Version: 1.0.0
* Author URI: http://www.redrokk.com