Skip to content

Instantly share code, notes, and snippets.

View digimix's full-sized avatar
🎯
Focusing

Digimix digimix

🎯
Focusing
  • Digimix
  • New York City
View GitHub Profile
@digimix
digimix / themeup.sh
Created August 16, 2016 20:43
Run setup for Sage based WordPress themes on Bedrock provisioned by Trellis.
#!/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
@digimix
digimix / woocommerce-optimize-scripts.php
Created August 11, 2016 22:46 — forked from DevinWalker/woocommerce-optimize-scripts.php
Only load WooCommerce scripts on shop pages and checkout + cart
/**
* 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' ) );
@digimix
digimix / README.md
Created August 2, 2016 19:39 — forked from jonathantneal/README.md
SASS @font-face mixin

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
<?php
function themename_customize_register($wp_customize){
$wp_customize->add_section('themename_color_scheme', array(
'title' => __('Color Scheme', 'themename'),
'priority' => 120,
));
// =============================
@digimix
digimix / Convert Custom Taxonomy to Custom Post Type
Created August 1, 2016 05:50 — forked from Strap1/Convert Custom Taxonomy to Custom Post Type
A very hacky and quick way to transfer a Custom Taxonomy to Custom Post Type and transfer associated metadata to Custom Meta Fields. Note: You can use this if it fits your needs, but it is custom to my set up. Use in a testing environment. It's a plugin with no interface, runs on activation and depending on the amount of data, may hit PHP timeou…
<?php
/*
Plugin Name: Convert Custom Taxonomy to Custom Post Type
Plugin URI: N/A
Description: A plugin to convert a Custom Taxonomy to a Custom Post Type and transfer associated metadata.
Version: 0.1
Author: Strap1
Author URI: http:/www.hiphopinenglish.com
/** Convert Taxonomy '%name%' to CPT '%name%' **/
@digimix
digimix / gist:235aec5b3844e99956b2
Created March 11, 2016 21:11 — forked from molotovbliss/gist:2562551
Magento Snippets

Magento Snippets

Set all categories to is_anchor 1

Find attribute_id

SELECT * FROM eav_attribute where attribute_code = 'is_anchor'

Update all of them with anchor_id from above (usually is ID 51)

UPDATE `catalog_category_entity_int` set value = 1 where attribute_id = 51
@digimix
digimix / local.xml
Created March 11, 2016 19:22 — forked from Maksold/local.xml
Magento XML - local.xml boilerplate
<?xml version="1.0"?>
<layout>
<default>
<!--Root/Default Layouts-->
<reference name="root">
<!--Appending Block-->
<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</reference>
<!--CSS and JS Files-->
@digimix
digimix / hovereffectideas-saddie.css
Created January 29, 2016 18:41
CodeDrops Hover Effect Ideas Set 1 Saddie
/* http://tympanus.net/Development/HoverEffectIdeas/ */
/*---------------*/
/***** Sadie *****/
/*---------------*/
figure.effect-sadie figcaption::before {
position: absolute;
top: 0;
left: 0;
width: 100%;
@digimix
digimix / Contract Killer 3.md
Created January 23, 2016 00:30 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: October 8th 2015
  • Original post

@digimix
digimix / lc-svg-upload.php
Created January 19, 2016 22:58 — forked from Lewiscowles1986/lc-svg-upload.php
SVG Media Plugin for WordPress (Works since 4.1.2!)
<?php
/*
Plugin Name: SVG Upload
Plugin URI: http://www.lewiscowles.co.uk
Description: Super PHP Plugin to add Full SVG Media support to WordPress, I should live in {$webroot}/wp-content/plugins/ folder ;)
Author: Lewis Cowles
Version: 1.5.2
Author URI: http://www.lewiscowles.co.uk/
*/
namespace lewiscowles\WordPress\Compat\FileTypes;