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
ssh {{server}} | |
cd {{folder}} | |
wp db export export.sql | |
tar -czf db.tar.gz export.sql | |
rsync -i -avz {{server}}/{{folder}}/db.tar.gz ./ | |
tar -xzf db.tar.gz | |
// if flywheel -> start ssh shell from UI |
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
sudo lsof -i tcp:3000 | |
kill -9 <PID> |
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
// check what will be affected | |
git clean -n | |
// remove untracked files | |
git clean -d | |
// remove untracked files and folders | |
git clean -f -d |
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
import slick from 'slick-carousel/slick/slick' | |
(function ($) { | |
const initGallerySlider = () => { | |
return $(".gallery").slick({ | |
arrows: false, | |
dots: false, | |
speed: 700, | |
fade: true, | |
}) |
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
const setPseudoElContent = (selector, value) => { | |
document.styleSheets[0].addRule(selector, `content: "${value}";`); | |
} | |
setPseudoElContent('.class::after', 'Hello World!'); |
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
mkdir joinSamples | |
cd joinSamples | |
git init | |
git remote add sample1 git.yourserver.local/sample1.git | |
git remote add sample2 git.yourserver.local/sample2.git | |
git fetch sample1 | |
git fetch sample2 | |
git branch sample1_master sample1/master | |
git branch sample2_master sample2/master |
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
cd path/to/project-b | |
git remote add project-a path/to/project-a | |
git fetch project-a | |
git merge --allow-unrelated-histories project-a/master # or whichever branch you want to merge | |
git remote remove project-a |
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
// smooth to top scroll | |
(function smoothscroll(){ | |
var currentScroll = document.documentElement.scrollTop || document.body.scrollTop; | |
if (currentScroll > 0) { | |
window.requestAnimationFrame(smoothscroll); | |
window.scrollTo (0,currentScroll - (currentScroll/5)); | |
} | |
})(); | |
// scroll event |
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
/* text */ | |
'my-field-1' => array( | |
'type' => 'text', | |
'label' => __( 'Text Field 1', 'fl-builder' ), | |
), | |
/* textarea */ | |
'my_textarea_field' => array( | |
'type' => 'textarea', |
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 ($) { | |
// display button after 60px scrolled | |
const showAtOffset = 60; | |
const $backToTop = $('.scroll-top-wrapper'); | |
// Show and hide the Button | |
$(document).on( 'scroll', function(){ | |
($(window).scrollTop() > showAtOffset) ? $backToTop.addClass('show'): $backToTop.removeClass('show'); | |
}); |
NewerOlder