This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var application_root = __dirname, | |
express = require("express"), | |
path = require("path"), | |
mongoose = require('mongoose'); | |
var app = express.createServer(); | |
// database | |
mongoose.connect('mongodb://localhost/ecomm_database'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#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); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#title :AnilPrz's Life with GIT & REACT | |
#description :This script helps to do everyday / every 3/4 hour git push or npm run build or git pull | |
#author :Anil Prajapati | |
#date :20181012 | |
#version :1 | |
#usage :bash gitpush.sh /home/anil/myrepo/ MyBranchName MyReactFolder | |
#notes :This is a personal script to make my life easier. It works for any GIT repo with REACT folder just inside the GIT repo. You can Skip react if you dont have | |
#bash_version :4.1.5 | |
#============================================================================== |
OlderNewer