Skip to content

Instantly share code, notes, and snippets.

View Enigama's full-sized avatar
🇺🇦
Hi there

YKryshtal Enigama

🇺🇦
Hi there
View GitHub Profile
@Enigama
Enigama / git-rename-branch.txt
Created December 2, 2021 11:48
Git helpful command
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>
@Enigama
Enigama / CRF-token.js
Created December 27, 2019 10:22
request header
/*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 = () => {
@Enigama
Enigama / index.js
Created November 23, 2019 15:55
fix scroll behind modal IOS
-webkit-overflow-scrolling: touch
@Enigama
Enigama / index.js
Last active October 27, 2019 14:40
function(procesenv='production', type, data){
if(procesenv == 'production'){
initAction(type, data);
}
if(procesenv == 'development'){
initAction(type, data);
}
}
function initAction(type, data){
@Enigama
Enigama / gist:76b8046238c1ab9b3c1870ab89c29ee8
Created April 12, 2019 10:41 — forked from ayamflow/gist:b602ab436ac9f05660d9c15190f4fd7b
Safari border-radius + overflow: hidden + CSS transform fix
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
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
@Enigama
Enigama / 0_reuse_code.js
Created August 9, 2017 21:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console