Skip to content

Instantly share code, notes, and snippets.

View shayhurley's full-sized avatar
💭
Life is like Tetris, achievements disappear, failures stick around forever.

Shay Hurley shayhurley

💭
Life is like Tetris, achievements disappear, failures stick around forever.
View GitHub Profile
add_theme_support('menus');
/*
http://codex.wordpress.org/Function_Reference/register_nav_menus#Examples
*/
register_nav_menus(array(
'top-bar-l' => 'Left Top Bar', // registers the menu in the WordPress admin menu editor
'top-bar-r' => 'Right Top Bar'
));
@shayhurley
shayhurley / db.php
Created December 4, 2012 10:03 — forked from jonasbjork/db.php
PHP code that parses wp-config.php and returns mysql command for connection to the database.
<?php
/**
* Get database connection string from a wp-config.php file.
*
* Usage: php db.php /var/www/wp-config.php
*
* Output: mysql -h DB_HOST -u DB_USER -pDB_PASSWORD DB_NAME
*
* @author Jonas Björk <jonas.bjork@me.com>
* @date 2012-12-04
@shayhurley
shayhurley / mq.css
Created October 4, 2012 13:11 — forked from chriscoyier/mq.css
Media Queries
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),
@shayhurley
shayhurley / gist:3487756
Created August 27, 2012 11:40 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt