#HTML presentation tools
There are many HTML presentation tools and they are all created for slightly different reasons. Here's an overview. Please let me know if I forgot any.
##CSSS
CSS-based SlideShow System
| def generate_secure_s3_url(s3_key) | |
| # | |
| # s3_key would be a path (including filename) to the file like: "folder/subfolder/filename.jpg" | |
| # but it should NOT contain the bucket name or a leading forward-slash | |
| # | |
| # this was built using these instructions: | |
| # http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?S3_QSAuth.html | |
| # http://aws.amazon.com/code/199?_encoding=UTF8&jiveRedirect=1 | |
| s3_base_url = MyApp::Application::S3_BASE_URL # i.e. https://mybucket.s3.amazonaws.com |
| <?php | |
| /* | |
| Plugin Name: Disable plugins when doing local dev | |
| Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify | |
| Version: 0.1 | |
| License: GPL version 2 or any later version | |
| Author: Mark Jaquith | |
| Author URI: http://coveredwebservices.com/ | |
| */ |
| <?php | |
| # License: Public Domain | |
| # I recommend replacing 'my_' with your own prefix. | |
| function my_template_path() { | |
| return My_Wrapping::$main_template; | |
| } |
| # The latest version of this script is now available at | |
| # https://github.com/jasoncodes/dotfiles/blob/master/aliases/rbenv.sh | |
| VERSION=1.9.3-p286 | |
| brew update | |
| brew install rbenv ruby-build rbenv-vars readline ctags | |
| if [ -n "${ZSH_VERSION:-}" ]; then | |
| echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc | |
| else | |
| echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile |
| iframe { | |
| max-width: 100%; | |
| } |
| <?php | |
| /** | |
| * WordPress Chosen Taxonomy Metabox | |
| * Author: Helen Hou-Sandi | |
| * | |
| * Use Chosen for a replacement taxonomy metabox in WordPress | |
| * Useful for taxonomies that aren't changed much on the fly and are | |
| * non-hierarchical in nature, as Chosen is for flat selection only. | |
| * You can always use the taxonomy admin screen to add/edit taxonomy terms. | |
| * Categories need slightly different treatment from the rest in order to |
This gist assumes:
| function countCSSRules() { | |
| var results = '', | |
| log = ''; | |
| if (!document.styleSheets) { | |
| return; | |
| } | |
| for (var i = 0; i < document.styleSheets.length; i++) { | |
| countSheet(document.styleSheets[i]); | |
| } | |
| function countSheet(sheet) { |
| <?php | |
| $term = get_the_terms( $post->ID, 'custom-taxonomy' ); | |
| foreach ($term as $key) { | |
| $parents = get_ancestors( $key->term_id, 'custom-taxonomy' ); | |
| foreach ($parents as $parent) { | |
| $key = get_term($parent, 'custom-taxonomy'); | |
| $parent = $key->slug; | |
| } | |
| } | |
| echo $parent; |