This file contains 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
# Replace URI, your_db_name and C:\somelocation with your values | |
mongodump --uri mongodb+srv://dbuser:[email protected] --authenticationDatabase admin --db your_db_name -o "C:\somelocation\your_db_name" | |
mongorestore --uri mongodb+srv://dbuser:[email protected] --authenticationDatabase admin --db your_restore_db_name "C:\somelocation\your_db_name" |
This file contains 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
'use strict'; | |
const autoprefixer = require('gulp-autoprefixer'); | |
const csso = require('gulp-csso'); | |
const del = require('del'); | |
const gulp = require('gulp'); | |
const sass = require('gulp-sass'); | |
const uglify = require('gulp-uglify'); | |
const rename = require("gulp-rename"); | |
const browserSync = require("browser-sync"); |
This file contains 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
/* scrollbar */ | |
*::-webkit-scrollbar-track | |
{ | |
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); | |
box-shadow: inset 0 0 6px rgba(0,0,0,0.3); | |
background-color: #F5F5F5; | |
} | |
*::-webkit-scrollbar | |
{ |
This file contains 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
function currency(value) { | |
return value.toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); | |
} | |
console.log(currency(1000.5)); | |
// logs 1,000.50 |
This file contains 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
@media only screen and (min-width:1280px) {} | |
@media (min-width:1024px) and (max-width:1279px) {} | |
@media (min-width:768px) and (max-width:1023px) {} | |
@media (min-width:480px) and (max-width:767px) {} | |
@media screen and (max-width:479px) {} |
This file contains 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 debug = process.env.NODE_ENV !== "production"; | |
var webpack = require('webpack'); | |
module.exports = { | |
context: __dirname, | |
devtool: debug ? "inline-sourcemap" : null, | |
entry: "./js/scripts.js", | |
output: { | |
path: __dirname + "/js", | |
filename: "scripts.min.js" |
This file contains 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
-- Replace http://oldurlhere with your old site url | |
-- Replace http://newurlhere with your new site url | |
-- Run the Query | |
UPDATE wp_options SET option_value = replace(option_value, 'http://oldurlhere', 'http://newurlhere') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://oldurlhere','http://newurlhere'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://oldurlhere', 'http://newurlhere'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://oldurlhere','http://newurlhere'); | |
This file contains 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
# ---- Edit file Drive:\xampp\apache\conf\extra\httpd-xampp.conf | |
# ---- Find below code at the bottom of the file | |
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))"> | |
Require local | |
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var | |
</LocationMatch> | |
# ---- Replace it with this code |
This file contains 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 getWorkingDays = function(start,endCount,holidays){ | |
var weekdays = []; | |
var current = start; | |
var i = 0; | |
while(i < endCount){ | |
if (!isWeekEnd(current)) { | |
weekdays.push(current); | |
i++; | |
} |