Skip to content

Instantly share code, notes, and snippets.

<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
@jasonyingling
jasonyingling / 4d3d3d3
Created August 2, 2013 22:22
Quickly and easily up your 4d3d3d3 by adding this to you .bash_profile
alias 4d3d3d3="/usr/bin/open -a '/Applications/Google Chrome.app' 'http://www.youtube.com/watch?v=XWX4GUYGQXQ'"
@jasonyingling
jasonyingling / .bash_profile
Last active December 20, 2015 12:08
.bash_profile to display directory location and current git branch. Based off Ollo's .bash_profile here https://gist.github.com/Ollo
Prompt and prompt colors
# 30m - Black
# 31m - Red
# 32m - Green
# 33m - Yellow
# 34m - Blue
# 35m - Purple
# 36m - Cyan
# 37m - White
# 0 - Normal
@jasonyingling
jasonyingling / functions.php
Created November 24, 2015 15:58
Creating a Custom Widget in WordPress
// Creating a Custom widget
/**
* Adds Foo_Widget widget.
*/
class Foo_Widget extends WP_Widget {
/**
* Register widget with WordPress.
*/
function __construct() {
@jasonyingling
jasonyingling / functions.php
Last active November 24, 2015 15:57
Registering a Sidebar in WordPress
// Function to create widgetized area
function meetup_widgetized_area() {
$args = array(
'name' => __('Meetup Widgetized Area', 'sample-child'),
'id' => 'meetup-widgetized-area',
'description' => 'A sample widegetized area',
'class' => '',
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widgettitle">',
@jasonyingling
jasonyingling / gist:191b19368e6f069f6263
Created February 12, 2015 19:43
ddSlick for Gravity Forms Drop Downs
$('.gfield select').each(function(e) {
var selectID = $(this).attr('id');
var selectName = $(this).attr('name');
$('#'+selectID).ddslick({
width: '100%',
background: '#ffffff',
onSelected: function(data){
$('#'+selectID+' .dd-selected-value').attr('name', selectName);
}
});