This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* css position demo | |
*/ | |
#container | |
{ | |
width: 400px; | |
position: relative; | |
border: 1px solid black; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Billings" to activate | |
tell application "System Events" | |
tell process "Billings" | |
tell menu bar 1 | |
tell menu bar item "Slips" | |
tell menu "Slips" | |
if menu item "Start Timer" exists then | |
click menu item "Start Timer" | |
else | |
click menu item "Stop Timer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A "deeper" indented text effect with the :before and :after pseudo-elements. | |
*/ | |
html, body { | |
height: 100%; | |
} | |
body { | |
margin: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Build the FAQ list for return. Dependent on an Advanced Custom Fields[http://www.advancedcustomfields.com/] repeater field 'faq' with containing 'question' [text] and 'answer' [wysiwyg]. | |
*/ | |
function jw1234_output_faq( $atts ){ | |
if (get_field('faq')): | |
$jw1234_faq = get_field('faq'); | |
$jw1234_question_index = "<ul class='faq-index'>"; | |
$jw1234_question_list = "<ul class='faq-list'>"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_ID_by_slug($page_slug) { | |
$page = get_page_by_path($page_slug); | |
if ($page) { | |
return $page->ID; | |
} else { | |
return null; | |
} | |
} | |
function is_page_or_child($slug){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Following this suggestion by @aral: | |
https://twitter.com/#!/aral/status/161833507423916032 and | |
https://twitter.com/#!/aral/status/161833979736096769 | |
I realised that a CSS Pre-processor could help save some time here if you | |
use the same values for px and rem. | |
This works in SCSS: | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test gist to see if the language dropdown ever works again. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Filter out hard-coded width, height attributes on all images in WordPress. | |
* https://gist.github.com/4557917 | |
* | |
* This version applies the function as a filter to the_content rather than send_to_editor. | |
* Changes made by filtering send_to_editor will be lost if you update the image or associated post | |
* and you will slowly lose your grip on sanity if you don't know to keep an eye out for it. | |
* the_content applies to the content of a post after it is retrieved from the database and is "theme-safe". | |
* (i.e., Your changes will not be stored permanently or impact the HTML output in other themes.) | |
* |
OlderNewer