Skip to content

Instantly share code, notes, and snippets.

fulfilled, like a resolved promise

Orlando Wenzinger Orlandster

fulfilled, like a resolved promise
View GitHub Profile
View gist:d7c9ed5c08023660449c7e844dff361b
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
Orlandster / gist:fbefbb13e3470c3895663ac146ad6fd3
Last active Nov 2, 2018
Mac Kill process on a specific port
View gist:fbefbb13e3470c3895663ac146ad6fd3
sudo lsof -i tcp:3000
kill -9 <PID>
View gist:33498d9fa2d6cae9812143eaa437c5a0
// check what will be affected
git clean -n
// remove untracked files
git clean -d
// remove untracked files and folders
git clean -f -d
View gist:4e2cf44829d9a413530b42782c0cdd17
(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');
Orlandster / gallery.js
Created Sep 25, 2018
WooCommerce Twig Single Proudct Gallery with variations
View gallery.js
Orlandster / gist:07e6771b04124c356d5e451b70a37634
Created Sep 13, 2018
Change content of Pseudo Element (::before, ::after) - ES6
View gist:07e6771b04124c356d5e451b70a37634
const setPseudoElContent = (selector, value) => {
document.styleSheets[0].addRule(selector, `content: "${value}";`);
setPseudoElContent('.class::after', 'Hello World!');
Orlandster / gist:38b54962ba49e769add0b6330ca1d4dc
Created Jul 27, 2018
Git: merge branch from different repositories
View gist:38b54962ba49e769add0b6330ca1d4dc
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
View gist:c1cf4975e4c7f766905b4d1bab5382b8
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
View beaver-module-field-types.php
/* text */
'my-field-1' => array(
'type' => 'text',
'label' => __( 'Text Field 1', 'fl-builder' ),
/* textarea */
'my_textarea_field' => array(
'type' => 'textarea',
Orlandster / snippet.js
Last active Feb 23, 2018
requestAnimationFrame - Snippets
View snippet.js
// smooth to top scroll
(function smoothscroll(){
var currentScroll = document.documentElement.scrollTop || document.body.scrollTop;
if (currentScroll > 0) {
window.scrollTo (0,currentScroll - (currentScroll/5));
// scroll event