This file contains hidden or 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
| <?php | |
| $args = array( | |
| 'post_type' => 'this-post', | |
| 'meta_query' => array( | |
| array( | |
| 'key' => 'this-post-last-name', | |
| 'value' => array( 'L', chr(ord('L')+1) ), | |
| 'orderby' => 'meta_value', | |
| 'compare' => 'BETWEEN', | |
| 'order' => 'ASC' |
This file contains hidden or 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
| <?php | |
| // Register "Print" Custom Endpoint, e.g. /listing/mylisting/print/ via http://make.wordpress.org/plugins/2012/06/07/rewrite-endpoints-api/ | |
| function az_add_print_endpoint() { | |
| add_rewrite_endpoint( 'print', EP_PERMALINK ); | |
| } | |
| add_action( 'init', 'az_add_print_endpoint' ); | |
| function az_print_endpoint_redirect() { | |
| global $wp_query; |
This file contains hidden or 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
| #! /usr/bin/python | |
| weeks = [ | |
| ('Monday','Tuesday','Wednesday','Thursday','Friday'), | |
| ('Monday','Tuesday','Wednesday','Thursday','Friday'), | |
| ('Monday','Tuesday','Wednesday','Friday'), | |
| ('Monday','Tuesday','Wednesday','Thursday','Friday'), | |
| ('Monday','Tuesday','Wednesday','Thursday','Friday'), | |
| ('Monday','Tuesday','Wednesday','Thursday','Friday'), |
This file contains hidden or 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
| // // Usage : casperjs filename.js | |
| // // Size of the browser i.e. viewport | |
| var view_width = 1024, view_height = 672; | |
| // // Size of the clipped image | |
| var clip_width = 1024, clip_height = 672; | |
| var casper = require("casper").create({ | |
| // // Set the viewport size |
This file contains hidden or 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
| copyto: { | |
| stuff: { | |
| files: [ | |
| {cwd: 'src/Dev/TaskBundle/Resources/public/', src: ['**/*'], dest: 'web/bundles/devtask/'} | |
| ], | |
| options: { | |
| processContent: function(content, path) { | |
| // do something with content or return false to abort copy | |
| return content; | |
| }, |
This file contains hidden or 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
| #!/bin/sh | |
| proj_dir_arrays=( $(find . -name 'partials' -type d ) ) | |
| location=`pwd` | |
| for proj_dir_array in "${proj_dir_arrays[@]}"; | |
| do | |
| cd $location/${proj_dir_array/.\/} | |
| shopt -s nullglob |
This file contains hidden or 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
| <?php | |
| $queried_object = get_queried_object(); | |
| echo "<pre>" ; var_dump($queried_object) ; echo "</pre>"; | |
| ?> |
This file contains hidden or 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
| <?php $args = array( | |
| 'base' => home_url() . '/news/%_%', | |
| 'format' => 'page/%#%/', | |
| 'total' => $wp_query->max_num_pages, | |
| 'current' => max( 1, $wp_query->query_vars['paged'] ), | |
| 'show_all' => true, | |
| //'end_size' => 1, | |
| //'mid_size' => 2, | |
| 'prev_next' => True, | |
| 'prev_text' => __('← Previous'), |
This file contains hidden or 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
| var statesData = {"type":"FeatureCollection","features":[ | |
| {"type":"Feature","id":"01","properties":{"name":"Alabama","density":94.65},"geometry":{"type":"Polygon","coordinates":[[[-87.359296,35.00118],[-85.606675,34.984749],[-85.431413,34.124869],[-85.184951,32.859696],[-85.069935,32.580372],[-84.960397,32.421541],[-85.004212,32.322956],[-84.889196,32.262709],[-85.058981,32.13674],[-85.053504,32.01077],[-85.141136,31.840985],[-85.042551,31.539753],[-85.113751,31.27686],[-85.004212,31.003013],[-85.497137,30.997536],[-87.600282,30.997536],[-87.633143,30.86609],[-87.408589,30.674397],[-87.446927,30.510088],[-87.37025,30.427934],[-87.518128,30.280057],[-87.655051,30.247195],[-87.90699,30.411504],[-87.934375,30.657966],[-88.011052,30.685351],[-88.10416,30.499135],[-88.137022,30.318396],[-88.394438,30.367688],[-88.471115,31.895754],[-88.241084,33.796253],[-88.098683,34.891641],[-88.202745,34.995703],[-87.359296,35.00118]]]}}, | |
| {"type":"Feature","id":"02","properties":{"name":"Alaska","density":1.264},"geometry":{"ty |
This file contains hidden or 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
| <?php get_header(); ?> | |
| <section> | |
| <!-- Put the following javascript before the closing </head> tag. --> | |
| <script> | |
| (function() { | |
| var cx = '000000000000000000000:aaa1aa1aa1a'; | |
| var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; | |
| gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + | |
| '//www.google.com/cse/cse.js?cx=' + cx; |
OlderNewer