Skip to content

Instantly share code, notes, and snippets.

View talha08's full-sized avatar
👨‍💻
Easy Life, Busy Day

Md Abu Talha talha08

👨‍💻
Easy Life, Busy Day
View GitHub Profile
let courses = [
{
"title":"ttile 1",
"id":"1",
"course_cat":"introduction"
},
{
"title":"title 2",
"id":"2",
"course_cat":null
Problem:
[Predis\Response\ServerException]
MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
Solution :
redis-cli
config set stop-writes-on-bgsave-error no
@talha08
talha08 / resource.js
Created January 21, 2019 06:58 — forked from vladikoff/resource.js
Angular $resource and transformResponse
angular.module('itemServices', ['ngResource'])
.factory('Item', ['$resource',
function ($resource) {
return $resource('items/:id',
{id: '@id'},
{
query: {
isArray: true,
method: 'GET',
params: {},
@talha08
talha08 / sql-mongo_comparison.md
Created December 17, 2018 20:55 — forked from aponxi/sql-mongo_comparison.md
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

console.warn('test')
console.info('test')
console.log('test')
console.error('test')
console.trace('test')
console.count('test')
console.group('test')
const student = {
firstname: 'Jhon',
lastname: 'Snow',
country: 'England'
};
const { firstname, lastname, country } = student;
console.log(`We are talking about ${firstname} ${lastname}, who came from ${country}`)
//"We are talking about Jhon Snow, who came from England"
const student = {
firstname: 'Jhon',
lastname: 'Snow',
ielts_scores: {
speaking: 8,
listening: 7.5,
writing: 8.5,
reading: 7.0
}
};
const student = {
firstname: 'Jhon',
lastname: 'Snow',
country: 'England'
};
const { firstname:firstName, lastname:lastName, country:origin} = student;
console.log(`We are talking about ${firstName} ${lastName}, who came from ${origin}`)
//"We are talking about Jhon Snow, who came from England"
const student = {
firstname: 'Jhon',
lastname: 'Snow',
};
const { firstname, lastname, country = "Bangladeh" } = student;
console.log(`We are talking about ${firstname} ${lastname}, who came from ${country}`)
//"We are talking about Jhon Snow, who came from Bangladeh"
@talha08
talha08 / destructuring_json.js
Last active October 29, 2018 17:23
ES6 Object Destructuring
const student = {
firstname: 'Jhon',
lastname: 'Snow',
country: 'England',
ielts_scores: {
speaking: 8,
listening: 7.5,
writing: 8.5,
reading: 7.0
}