Skip to content

Instantly share code, notes, and snippets.

View raphaelkross's full-sized avatar

Rafael Angeline raphaelkross

View GitHub Profile
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="content">
*
* @package ivan_framework
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
- [x] Home - http://lumeninteractive.com/index/
- [x] About - http://lumeninteractive.com/wip-us/
- Hire Us to Speak at your Event
- Our Partners
- Our Story
- Scholarship
- [x] Blog - http://lumeninteractive.com/blog/
...
- [x] SEO - http://lumeninteractive.com/wip-search-engine-optimization/
- [x] Web Design - (migrate gallery of projects to my own - http://codeniners.wpdemo.io/eliteaddons/work/caption-cover-special/)
@raphaelkross
raphaelkross / gist:5d12975250c58f11d0fc
Created November 17, 2014 20:05
Enable Compression in HTACCESS
# ------------------------------------------------------------------------------
# | Compression |
# ------------------------------------------------------------------------------
<IfModule mod_deflate.c>
# Force compression for mangled headers.
# https://developer.yahoo.com/blogs/ydn/pushing-beyond-gzipping-25601.html
@raphaelkross
raphaelkross / Javascript Immutable Operations
Created March 27, 2016 05:18
Javascript Immutable Operations
// Arrays & Objs Without Mutations
var list = ['1', '2', '3'];
var obj = {item: 1, blob: 2};
// Adds item to array
list.concat(['4', '5']);
[...list, [4, 5]];
@raphaelkross
raphaelkross / functions.php
Created June 5, 2016 06:09
Change threshold WooCommerce Variations
function custom_wc_ajax_variation_threshold( $qty, $product ) {
return 200;
}
add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 10, 2 );
$('ul.nav li a, .logo a, .featured a, .hero-section a, .prices a').on('click', function(e) {
el = $(this).attr('href');
if (el.charAt(0) == "#") {
$('html, body').animate({
scrollTop: $(el).offset().top - 74
}, 750);
e.preventDefault();
}
});
@raphaelkross
raphaelkross / gist:208aa8bcfbf112a1dfc7b8021837352d
Created July 27, 2016 08:41
Zip to ThemeForest w/out DS_Store
sudo zip -r ivan-offset-all.zip ivan-offset.zip Documentation Import -x "*.DS_Store"
@raphaelkross
raphaelkross / webpack.php
Created July 28, 2016 02:09
Enqueue our dynamic webpack code
if(false == IVAN_OFFSET_DEBUG) {
// Register main theme styles and enqueue it.
// Hint: you can unregister it and replace by your own compiled version in a child theme.
wp_enqueue_style( 'ivan-theme-styles', get_template_directory_uri() . '/css/theme-styles'.$prefix.'.css', array(), '1' );
} else {
wp_enqueue_script( 'webpack-dev-server', 'http://localhost:3002/webpack-dev-server.js', array(), null, false );
wp_enqueue_script( 'webpack-bundle', 'http://localhost:3002/hmr/bundle.js', array(), null, false );
}
@raphaelkross
raphaelkross / functions.php
Created August 4, 2016 23:02
Increase Variation per Page number
function custom_wc_ajax_variation_threshold( $qty, $product ) {
return 10;
}
add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 10, 2 );
@raphaelkross
raphaelkross / functions.php
Created August 4, 2016 23:35
Increase Server Configs to Allow Import
ini_set('memory_limit', '128M');
ini_set('upload_max_filesize', '128M');
ini_set('post_max_size', '128M');
ini_set('file_uploads', 'On');
ini_set('max_execution_time', '500');
ini_set('file_uploads', 'On');