Skip to content

Instantly share code, notes, and snippets.

@cfxd
cfxd / dabblet.css
Last active December 20, 2015 10:59 — forked from oksushi/dabblet.css
Tableless horizontal navigation bar with padding and even spacing; no space between elements, no unused container space, and no fixed width (so works for any number of elements!).Fiddle at http://jsfiddle.net/VBcUM/2/
/**
* Using display: table-cell to evenly determine widths. You can add an arbitrary number of <li>
*/
ul {
padding: 0;
display: table;
width: 100%;
table-layout: fixed;
@jameskoster
jameskoster / functions.php
Last active October 5, 2020 17:34
WooCommerce - Remove product data tabs
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
function woo_remove_product_tabs( $tabs ) {
unset( $tabs['description'] ); // Remove the description tab
unset( $tabs['reviews'] ); // Remove the reviews tab
unset( $tabs['additional_information'] ); // Remove the additional information tab
return $tabs;
@bainternet
bainternet / tax_cpt_filter_class.php
Created February 6, 2013 13:29
Simple class to add custom taxonomy dropdown to a custom post type admin edit list
<?php
if (!class_exists('Tax_CTP_Filter')){
/**
* Tax CTP Filter Class
* Simple class to add custom taxonomy dropdown to a custom post type admin edit list
* @author Ohad Raz <admin@bainternet.info>
* @version 0.1
*/
class Tax_CTP_Filter
{
@oksushi
oksushi / dabblet.css
Created September 20, 2012 07:10
Using display: table-cell to evenly determine widths. You can add an arbitrary number of <li>
/**
* Using display: table-cell to evenly determine widths. You can add an arbitrary number of <li>
*/
ul {
padding: 0;
display: table;
width: 100%;
background: hotpink;
@kevinelliott
kevinelliott / osx-10.9-setup.md
Last active November 6, 2020 14:19 — forked from juev/gist:3124344
Clean Install – Mac OS X 10.9 Mavericks

Mac OS X 10.9 Mavericks

Custom recipe to get OS X 10.9 Mavericks running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install.

Install Software

The software selected is software that is "tried and true" --- software I need after any fresh install. I often install other software not listed here, but is handled in a case-by-case basis.

Install from App Store

@aalaap
aalaap / gist:3066704
Created July 7, 2012 14:39
Sample HTML page with Twitter's Bootstrap, Ryan Fait's Sticky Footer, and a full-width footer, fixed for responsive layouts by Aalaap Ghag
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="author" content="Aalaap Ghag" />
<title>Twitter&rsquo;s Bootstrap with Ryan Fait&rsquo;s Sticky Footer and Aalaap Ghag&rsquo;s Responsive Padding Fix</title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link href="css/bootstrap-responsive.css" rel="stylesheet">
<style>
html, body {
@da1nonly
da1nonly / gist:2057532
Created March 17, 2012 10:55
wordpress meta box urls
<?php
add_action('admin_init', 'add_meta_boxes', 1);
function add_meta_boxes() {
add_meta_box( 'repeatable-fields', 'Audio Playlist', 'repeatable_meta_box_display', 'post', 'normal', 'high');
}
function repeatable_meta_box_display() {
global $post;
@boucher
boucher / gist:1750375
Created February 6, 2012 07:09 — forked from siddarth/gist:1379745
Stripe PHP simple example
<?php
require 'path-to-Stripe.php';
if ($_POST) {
Stripe::setApiKey("YOUR-API-KEY");
$error = '';
$success = '';
try {
if (!isset($_POST['stripeToken']))
throw new Exception("The Stripe Token was not generated correctly");
@helen
helen / repeatable-fields-metabox.php
Created January 11, 2012 04:42
Repeating Custom Fields in a Metabox
<?
/**
* Repeatable Custom Fields in a Metabox
* Author: Helen Hou-Sandi
*
* From a bespoke system, so currently not modular - will fix soon
* Note that this particular metadata is saved as one multidimensional array (serialized)
*/
function hhs_get_sample_options() {
@mislav
mislav / pagination.md
Created October 12, 2010 17:20
"Pagination 101" by Faruk Ateş

Pagination 101

Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o