Skip to content

Instantly share code, notes, and snippets.

View bangsite's full-sized avatar

Bang bangsite

View GitHub Profile
@bangsite
bangsite / Localhost Wordpress Permissions
Created June 16, 2020 03:49 — forked from shawnrgrimes/Localhost Wordpress Permissions
Enable updating WordPress in a local environment on OS X (Updates, Themes and Plugins)
On Mac OS X (Leopard+), the Apache HTTP Server runs under the user account, _www which belongs to the group _www. To allow WordPress to configure wp-config.php during installation, update files during upgrades, and update the .htaccess file for pretty permalinks, give the server write permission on the files.
One way to do this is to change the owner of the wordpress directory and its contents to _www. Keep the group as staff, a group to which your user account belongs and give write permissions to the group.
$ cd /<wherever>/Sites/<thesite>
$ sudo chown -R _www wordpress
$ sudo chmod -R g+w wordpress
This way, the WordPress directories have a permission level of 775 and files have a permission level of 664. No file nor directory is world-writeable.
@bangsite
bangsite / cloudSettings
Created April 27, 2020 16:37
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-04-27T16:37:43.339Z","extensionVersion":"v3.4.3"}
@bangsite
bangsite / responsive.css
Created March 22, 2020 10:07 — forked from codesynapse/responsive.css
Mobile responsive CSS
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
@bangsite
bangsite / meta-tags.md
Created October 2, 2019 08:44 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@bangsite
bangsite / hamburger-menu-animations.markdown
Created June 24, 2019 03:32
Hamburger Menu Animations
@bangsite
bangsite / xampp_php7_xdebug.md
Created May 15, 2019 11:52 — forked from odan/xampp_php7_xdebug.md
Installing Xdebug for XAMPP

Installing Xdebug for XAMPP with PHP 7.x

Requirements

Setup

@bangsite
bangsite / products_with_category.sql
Created May 8, 2019 02:23 — forked from phlbnks/products_with_category.sql
Select Product name, SKU, price and category from WordPress / WooCommerce with MySQL query
SELECT
wp_posts.post_title AS Product,
wp_postmeta1.meta_value AS SKU,
wp_postmeta2.meta_value AS Price,
GROUP_CONCAT( wp_terms.name ORDER BY wp_terms.name SEPARATOR ', ' ) AS ProductCategories
FROM wp_posts
LEFT JOIN wp_postmeta wp_postmeta1
ON wp_postmeta1.post_id = wp_posts.ID
AND wp_postmeta1.meta_key = '_sku'
LEFT JOIN wp_postmeta wp_postmeta2