Skip to content

Instantly share code, notes, and snippets.

View anil3a's full-sized avatar
🏠
Working from home

Anil Prajapati anil3a

🏠
Working from home
View GitHub Profile
composer require nunomaduro/phpinsights --dev
Using version ^1.3 for nunomaduro/phpinsights
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for illuminate/contracts (locked at v5.5.44) -> satisfiable by illuminate/contracts[v5.5.44].
- nunomaduro/phpinsights v1.3.0 requires symplify/package-builder 5.4.16 -> satisfiable by symplify/package-builder[v5.4.16].
@anil3a
anil3a / functions.php
Created July 14, 2017 02:58
Adding a filter to add extra custom fields for Wp Job Manager Search query job submission
// Adding a filter to add extra custom fields for Wp Job Manager Search query job submission.
add_filter( 'job_listing_searchable_meta_keys' , 'add_my_custom_post_meta_fields_here');
function add_my_custom_post_meta_fields_here( $wp_job_search_fields )
{
return array_push( $wp_job_search_fields, "_job_Contact_Name");
}
@anil3a
anil3a / gist:06c08bcdf262a1c0efe1990b44ae0583
Created May 15, 2017 06:24 — forked from spsaucier/gist:6044070
Wordpress - Import Posts - Assign to Author
$('#authors > li').each(function(){
var textstring = $(this).find('strong').text().split(" (");
console.info(textstring[0]);
$(this).find('select[name^=user_map] option').filter(function() {
return $(this).text() == textstring[0];
}).prop('selected', true);
});
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@anil3a
anil3a / Australian Table Rates
Created June 7, 2016 02:02
Add support for shipping in Australia for Magento table rates
// table rate CSV example:
"Country","Region/State","Zip/Postal Code","Order Subtotal (and above)","Shipping Price"
"AU","*","*","250","0"
"AU","VIC","*","0","10"
"AU","NSW","*","0","12"
"AU","QLD","*","0","12"
"AU","ACT","*","0","12"
"AU","NT","*","0","12"
"AU","WA","*","0","12"
@anil3a
anil3a / app.js
Created November 1, 2013 10:08 — forked from pixelhandler/app.js
var application_root = __dirname,
express = require("express"),
path = require("path"),
mongoose = require('mongoose');
var app = express.createServer();
// database
mongoose.connect('mongodb://localhost/ecomm_database');
@anil3a
anil3a / api.js
Created November 1, 2013 09:58 — forked from fwielstra/api.js
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
*/
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');
@anil3a
anil3a / api.js
Created October 31, 2013 09:59 — forked from fwielstra/api.js
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
*/
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');
@anil3a
anil3a / api.js
Created October 31, 2013 09:57 — forked from fwielstra/api.js
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
*/
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');