Skip to content

Instantly share code, notes, and snippets.

@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;
@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;
(function ($) {
// Creates an iframe with an embedded HipChat conversation window.
//
// Options:
// url - The url to the room to embed; required
// container - The container in which to insert the HipChat panel; required
// timezone - The timezone to use in the embedded room; required
// welcome - A welcome message to display when the room is joined; optional
// noframes - Content to include when iframes are disabled in the browser; optional
@AllThingsSmitty
AllThingsSmitty / columns.css
Last active October 1, 2017 01:24
Columns with equal height using Flexbox
@import url(http://fonts.googleapis.com/css?family=Open+Sans);
html {
background: #444;
box-sizing: border-box;
font-family: "Open Sans", sans-serif;
line-height: 1.4;
}
*, *:before, *:after {
box-sizing: inherit;
}
@wturnerharris
wturnerharris / class-membership.php
Last active February 15, 2019 12:46
Class to make things members-only in WordPress.--This class depends on a custom capability called 'is_approved_member' for user member access and the custom post meta key '_members_only' as a post-level custom field.
<?php
/**
* Custom class for WP_Membership routines.
*
*
* @package WP_Membership
* @since WP_Membership 0.1
*/
if(realpath(__FILE__) === realpath($_SERVER["SCRIPT_FILENAME"]))
@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;
@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;
@lgladdy
lgladdy / grunt-sitemap.php
Created April 13, 2014 14:25
Grunt Sitemap Generator plugin for Wordpress
<?php
/**
* Plugin Name: Grunt Sitemap Generator
* Plugin URI: http://www.github.com/lgladdy
* Description: Generate a JSON list of every page on a site so it can be used with grunt and uncss. Create a folder in /wp-content called mu-plugins, and drop this code into that folder, as grunt-sitemap.php
* Author: Liam Gladdy
* Author URI: http://gladdy.co.uk
* Version: 1.0
*/