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
Renaming local and remote | |
# Rename the local branch to the new name | |
git branch -m <old_name> <new_name> | |
# Delete the old branch on remote - where <remote> is, for example, origin | |
git push <remote> --delete <old_name> | |
# Or shorter way to delete remote branch [:] | |
git push <remote> :<old_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
/*axios*/ | |
const setUpCSRFToken = () => { | |
let token = document.head.querySelector('meta[name="csrf-token"]'); | |
axios.defaults.headers.common = { | |
'X-Requested-With': 'XMLHttpRequest', | |
'X-CSRF-TOKEN': token.content | |
}; | |
}; | |
/*ajax*/ | |
const setUpCSRFToken = () => { |
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
-webkit-overflow-scrolling: touch |
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(procesenv='production', type, data){ | |
if(procesenv == 'production'){ | |
initAction(type, data); | |
} | |
if(procesenv == 'development'){ | |
initAction(type, data); | |
} | |
} | |
function initAction(type, data){ |
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
// Add on element with overflow | |
-webkit-mask-image: -webkit-radial-gradient(white, black); |
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
npm i | |
npm i gulp --save-dev | |
npm i gulp-less --save-dev | |
npm i browser-sync --save-dev | |
npm i -g bower | |
bower i jquery magnific-popup | |
npm i --save-dev gulp-concat gulp-uglifyjs | |
npm i gulp-cssnano gulp-rename --save-dev | |
npm i del --save-dev | |
npm i gulp-imagemin imagemin-pngquant --save-dev |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |