Skip to content

Instantly share code, notes, and snippets.

@kenzik
kenzik / setting-up-babel-nodemon.md
Last active April 7, 2018 13:42 — forked from sam-artuso/setting-up-babel-nodemon.md
Setting up Babel and nodemon

Setting up Babel and nodemon

Inital set-up

Set up project:

mkdir project
cd project
npm init -y
@kenzik
kenzik / facet.css
Last active September 25, 2017 19:33 — forked from djrmom/facet.css
facetwp css classes
/**
** facet classes
**/
.facetwp-facet {
/* class of div that wraps each facet type */
}
.facetwp-facet-FACET-NAME {
/* class for a facet where facet name is FACET-NAME, applied to same div as .facetwp-facet */
}
@kenzik
kenzik / functions.php
Created January 6, 2017 00:44 — forked from billerickson/functions.php
Genesis infinite scroll, supporting column classes, custom settings by page, and both auto + button loading
<?php
/**
*
* Infinite Scroll
*
* @since 1.0.0
*
* @author Lauren Gray
* @author Bill Erickson
// https://css-tricks.com/responsive-data-tables/
// https://css-tricks.com/examples/ResponsiveTables/responsive.php
// http://elvery.net/demo/responsive-tables/
.no-more-tables-container {
@mixin no-more-tables-mixin {
// Force table to not be like tables anymore
table, thead, tbody, th, td, tr {
display: block;
}
@kenzik
kenzik / remove-rev-slider-metabox.php
Created March 30, 2016 12:09 — forked from DevinWalker/remove-rev-slider-metabox.php
This code removed the Revolution Slider metabox on pages, posts and CTPs
/**
* Remove Rev Slider Metabox
*/
if ( is_admin() ) {
function remove_revolution_slider_meta_boxes() {
remove_meta_box( 'mymetabox_revslider_0', 'page', 'normal' );
remove_meta_box( 'mymetabox_revslider_0', 'post', 'normal' );
remove_meta_box( 'mymetabox_revslider_0', 'YOUR_CUSTOM_POST_TYPE', 'normal' );
}
@kenzik
kenzik / gist:fc33913acf94c5a45c59
Created February 23, 2016 14:43 — forked from ericandrewlewis/gist:95239573dc97c0e86714
Setting up a WordPress site on AWS

Setting up a WordPress site on AWS

This tutorial walks through setting up AWS infrastructure for WordPress, starting at creating an AWS account. We'll manually provision a single EC2 instance (i.e an AWS virtual machine) to run WordPress using Nginx, PHP-FPM, and MySQL.

This tutorial assumes you're relatively comfortable on the command line and editing system configuration files. It is intended for folks who want a high-level of control and understanding of their infrastructure. It will take about half an hour if you don't Google away at some point.

If you experience any difficulties or have any feedback, leave a comment. 🐬

Coming soon: I'll write another tutorial on a high availability setup for WordPress on AWS, including load-balancing multiple application servers in an auto-scaling group and utilizing RDS.

@kenzik
kenzik / register-post-type.php
Created February 10, 2016 13:29 — forked from justintadlock/register-post-type.php
Help file when registering post types.
<?php
# Register custom post types on the 'init' hook.
add_action( 'init', 'my_register_post_types' );
/**
* Registers post types needed by the plugin.
*
* @since 1.0.0
* @access public
@kenzik
kenzik / osx-for-hackers.sh
Created October 28, 2015 01:16 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'

Contract Killer

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

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

$(document).bind('cbox_complete', function(){
if($('#cboxTitle').height() > 20){
$("#cboxTitle").hide();
$("<div>"+$("#cboxTitle").html()+"</div>").css({color: $("#cboxTitle").css('color')}).insertAfter("#cboxPhoto");
$.fn.colorbox.resize();
}
});