Skip to content

Instantly share code, notes, and snippets.

@rickrduncan
rickrduncan / genesis-page-titles-html5.php
Last active August 1, 2022 11:16
How to remove page titles from Genesis child themes using XHTML and HTML5 methods.
<?php
//* Do NOT include the opening php tag
//* ALL EXAMPLES ON THIS PAGE USE THE NEW HTML5 METHOD
//* Remove page titles site wide (posts & pages) (requires HTML5 theme support)
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
@cdils
cdils / utility-widgets.php
Last active June 16, 2016 03:44
Add two widgetized areas above the header in Genesis.
/**
* Register Utility Bar Widget Areas.
*
* @author Carrie Dils
* @copyright Copyright (c) 2013, Carrie Dils
* @license GPL-2.0+
*/
genesis_register_sidebar( array(
'id' => 'utility-bar-left',
'name' => __( 'Utility Bar - Left', 'theme-prefix' ),
@murdoch
murdoch / check-uri.rb
Created August 24, 2011 16:51
Check if uri exists
## just some ways to check if a url exists
# method 1 - from Simone Carletti
require "net/http"
url = URI.parse("http://www.google.com/")
req = Net::HTTP.new(url.host, url.port)
res = req.request_head(url.path)
# method 2 - from some kid on the internet
require 'open-uri'
@byplayer
byplayer / rspec_cheat_sheet.rd
Created May 11, 2011 03:16
rspec cheat sheet
INSTALL
=======
$ gem install rspec
RSPEC-RAILS
===========
RAILS-3
=======
@dnagir
dnagir / rspec-syntax-cheat-sheet.rb
Created November 5, 2010 09:29
RSpec 2 syntax cheat sheet by example
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")