Month: January 2018

Git fatal: Unable to find remote helper for http

The problem is actually your PATH doesn’t include a path to the  git-remote-http file inside your git-core folder. If you try to find it, you can type in whereis git-core and it will show git-core: /usr/libexec/git-core /usr/share/git-core the first one is what we are looking for please add /usr/libexec/git-core to your PATH, and if you don’t know how to do


Add PATH for Centos7

it is not a good idea to just add it to the /etc/profile because whenever there is a system change, your setting inside that file maybe wiped out. A more sensible way is to add it to /etc/profile.d  for all users. If you just want to add PATH to a single user, then please add it to ~/.profile .  


Axios 使用方法

安裝 使用 npm $ npm install axios 使用 bower $ bower install axios 使用 CDN <script src=”https://unpkg.com/axios/dist/axios.min.js”></script>  使用 Post axios.post(‘/user’, { firstName: ‘Fred’, lastName: ‘Flintstone’ }) .then(function (response) { console.log(response); }) .catch(function (error) { console.log(error); }); 加入 header 功能 axios.post(‘http://localhost:8080/foo’, data, { headers: { ‘Authorization’: ‘Bearer ‘ + token, ‘Content-Type’: ‘application/json’, }, timeout: 1000, })


Magento 2: Create REST API

There are three user types to access the API you created Guest they can access anonymous resources Administrator/Integration they can access resource which has been configured Customer they can access resource with self or anonymous permission There are a few files to e defined. <module location>/ = /app/code/Aiart/Hotel In order to create a REST API


Magento: create a module

1. Disable Magento cache Admin → System → Cache Management → select  cache types from below and disable them Configuration Layouts Collections Data You can disable everything, but it is going to be very slow. 2. Put Magento into a developer mode php bin/magento deploy:mode:set developer 3. Creating the module files and folders 3-1. create