Instantly share code, notes, and snippets.

View git_rebase.md

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

View wordpress-html-cheatsheet.md

About

Create better landing pages in WordPress more efficiently by learining a little bit of code. This document is created for digital marketers who are ready to take their creative visions to the next level, and stop relying puring on the user intface based digital publishing platforms. We will keep this simple, focusing on frontend code that will allow you to create customized layouts based on preformatted styles available in your WordPress theme. Digimix WordPress themes are built on Bootstrap, the worlds leading frontend framework, so many of the pricinples you learn here can be applied to other websites and digital products.

Filler Content

This document uses Lorem Ipsum as placeholder content for example purposes. Any text beinging with Lorem ipsum should be replaced with your real content.

Lorum Ipsum Example

View php7.2-ppa-install-ubuntu16.md

Add the PPA, updated apt-get, install php7.2.

Commands for adding php7.2 via apt-get with PPA

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.2-cli

View wordpress-php-reqs.yml
disable_default_pool: true
memcached_sessions: false
php_extensions_default:
php7.2-cli: "{{ apt_package_state }}"
php7.2-common: "{{ apt_package_state }}"
php7.2-curl: "{{ apt_package_state }}"
php7.2-dev: "{{ apt_package_state }}"
php7.2-fpm: "{{ apt_package_state }}"
php7.2-gd: "{{ apt_package_state }}"
View extract-hashtags-text-command.md

$: pbpaste | grep '#\w\+' -o | tr 'A-Z' 'a-z' | sort | uniq -c | pbcopy

Terminal command: paste, find all hashtags, convert to lowercase, sort in alphabetical order, only show uniques and also show the count how many times it was found in the list, copy the results

Works with Mac OSX

View Michael_Checkers_Announces_Partnership_with_Topman.md

FOR IMMEDIATE RELEASE

Michael Checkers Announces Partnership with Topman for Topman Denim

Michael Checkers, Miami Beach, Florida, United States – March 20, 2018 – Michael Checkers today announced that he has joined the Topman Denim - A Celebration Of The Fabric We Live In campaign for Topman, a British multinational men’s fashion retailer. The Topman Denim - A Celebration Of The Fabric We Live In campaign allows men’s fashion influencers to create unique outfits that best meets their audiences style preferences. As a brand partner, Michael Checkers will create a series of men’s street style looks featuring Topman Jeans and men’s streetwear fashion trends for Spring 2018. This relationship is designed to add mutual value for current customers and to increase targeted exposure and reputation for both companies.

“Denim is a key part of my wardrobe this Spring, and the starting point for most of my street style looks. That’s why I’m excited to be partnering with Topman and styling some of the ho

View trellis-deploy-redirects-error.md

Error

Happens after deploying a Roots WordPress instance to Ubuntu vps via Trellis Ansible playbook.

` This page isn’t working

example.com redirected you too many times.

  • Try clearing your cookies. ERR_TOO_MANY_REDIRECTS
View themeup.sh
#!/bin/bash
# Initiating Digimix theme setup
echo "Initiating Digimix theme setup"
# install node modules
echo "install node modules"
npm install
# install bower components
View themeup.sh
#!/bin/bash
echo -e "Which directory theme you like to setup?"
read theme
# Initiating Digimix theme setup
echo "Initiating Digimix theme setup"
cd /srv/www/digimix.co/current/web/app/themes/$theme
# install node modules
View woocommerce-optimize-scripts.php
/**
* Optimize WooCommerce Scripts
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages.
*/
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 );
function child_manage_woocommerce_styles() {
//remove generator meta tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );