How to fix “./composer.json” does not contain valid JSON

It something wrong in the composer.json file, check the config.platform  part: $ composer install [Composer\Json\JsonValidationException] “./composer.json” does not match the expected JSON schema: – config.platform : Array value found, but an object is required $ composer install[Seld\JsonLint\ParsingException] “./composer.lock” does not contain valid JSON Parse error on line 548: …-21T16:29:17+00:00″<<<<<<< HEAD======= ———————^ Expected one of: ‘EOF’, ‘}’, ‘:’, …

How to git merge one file from other branch to master

Step 1: clone from master git clone [email protected] Step 2: checkout the file from a branch $ git checkout dev Application/view/core/auth/email-reset.phtml error: pathspec ‘dev’ did not match any file(s) known to git. error: pathspec ‘Application/view/core/auth/email-reset.phtml’ did not match any file(s) known to git. $ ls Application/view/core/auth/email-reset.phtml ls: Application/view/core/auth/email-reset.phtml: No such file or directory $ git …

How to ignore everything in a directory except one sub folder or file

Here I want to ignore everything except the passport folder. You must exclude the vendor/ folder first(!/vender), then ignore everything ( /vendor/*) except the laravel folder itself(!/vendor/laravel), thenignore everything (/vendor/laravel/*) except the passport folder itself(!/vendor/laravel/passport/),: !/vender /vendor/* !/vendor/laravel /vendor/laravel/* !/vendor/laravel/passport/

Install php5.6/7.2/php5.3 different php version via macports

# Install php 5.3 sudo port install php53 php53-curl php53-fpm php53-gd php53-iconv php53-imagick php53-mbstring php53-mcrypt php53-mysql php53-openssl php53-iconv php53-mbstring sudo cp /opt/local/etc/php53/php.ini-development /opt/local/etc/php53/php.ini sudo cp /opt/local/etc/php53/php-fpm.conf.default /opt/local/etc/php53/php-fpm.conf cd /opt/local/etc/php53/ sudo vi php-fpm.conf change listen = 127.0.0.1:9053 start: sudo port load php53-fpm stop : sudo port unload php53-fpm => note, maybe need to change short_open_tag = …

Compress huge image files without suffix via Gulp

var gulp = require(‘gulp’); const imagemin = require(‘gulp-imagemin’); var once = require(‘async-once’); var imageminMozjpeg = require(‘imagemin-mozjpeg’); var rename = require(“gulp-rename”); const del = require(‘del’); var tap = require(“gulp-tap”); var replaceName = require(‘gulp-replace-name’); const source_dir = ‘img_source’; const target_dir = ‘img_gulp’; gulp.task(‘clean’, done => { del(target_dir + ‘/*.jpg’); // returns a promise done(); }); gulp.task(‘prepare’, done …

Vue/React migration to another server npm run watch error

to fix it: npm i node-sass ERROR in ./resources/sass/tool.scss Module build failed: ModuleBuildError: Module build failed: Error: Missing binding /xxx/laravel/nova-components/MoreReports/node_modules/node-sass/vendor/darwin-x64-67/binding.node Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 11.x Found bindings for the following environments: – OS X 64-bit with Node.js 8.x This usually happens because your environment …

Compile/watch/compress scss file to css

brew install sass/sass/sass $ sass –version 1.16.1 sass –watch style.scss ../css/style.css sass style.scss ../css/style.css –style compressed style.scss contains mutilple scss files: @import url(‘https://fonts.googleapis.com/css?family=Lato|Roboto’); @import “reset”; @import “variables”; @import “mixins”; @import “layout”; @import “text”; @import “nav”; @import “content”; @import “forms”; @import “selectBoxIt”; @import “responsive”;   $ sass –watch scss/main.scss:css/main.css Compiled scss/main.scss to css/main.css. Sass is watching …