An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| /** | |
| * Invokes a function, performing up to 5 retries with exponential backoff. | |
| * Retries with delays of approximately 1, 2, 4, 8 then 16 seconds for a total of | |
| * about 32 seconds before it gives up and rethrows the last error. | |
| * See: https://developers.google.com/google-apps/documents-list/#implementing_exponential_backoff | |
| <h3>Examples:</h3> | |
| <pre>//Calls an anonymous function that concatenates a greeting with the current Apps user's email | |
| var example1 = GASRetry.call(function(){return "Hello, " + Session.getActiveUser().getEmail();}); | |
| </pre><pre>//Calls an existing function | |
| var example2 = GASRetry.call(myFunction); |
| <?php | |
| add_action( 'tgmsp_before_slider_output', 'tgm_custom_slider_theme' ); | |
| function tgm_custom_slider_of_madness( $id ) { | |
| // If not the proper slider ID, do nothing. Change to match your slider ID. | |
| if ( '324' !== $id ) return; | |
| // Dequeue the default styles. | |
| wp_dequeue_style( 'soliloquy-style' ); | |
| /** | |
| * INSTALLATION: this code should be pasted into your theme's functions.php file. | |
| * | |
| * Use this filter to change the margin between each image in the a carousel. | |
| * | |
| * [It is not possible to do with CSS alone!] | |
| */ | |
| function metaslider_carousel_margin($margin, $slider_id) { | |
| return 10; // value in pixels | |
| } |
| <?php //functions.php | |
| add_filter('metaslider_flex_slider_parameters', 'metaslider_flex_params', 10, 3); | |
| function metaslider_flex_params($options, $slider_id, $settings) | |
| { | |
| $options['after'][] = "onHomePageSlideChanged(slider);"; | |
| return $options; | |
| } |
| <?php | |
| /* | |
| WORDPRESS SPECIFIC AJAX HANDLER (because admin-ajax.php does not render plugin shortcodes). | |
| by alexandre@pixeline.be | |
| credits: Raz Ohad https://coderwall.com/p/of7y2q/faster-ajax-for-wordpress | |
| */ | |
| //mimic the actual admin-ajax | |
| define('DOING_AJAX', true); | |
| if (!isset( $_REQUEST['action'])) |
| <?php | |
| /* | |
| Our Template Page for Single Locations created with Local SEO by Yoast | |
| Local SEO is good at at formatting this data use the schema format, please make sure you continue to support it. | |
| */ | |
| get_header(); ?> | |
| <h1>Locations</h1> |
| // Can be added on any page with a gravity form, it will hook into GF's own event that triggers when the confirmation is loaded (confirmed conversion). | |
| (function($) { | |
| $(document).bind("gform_confirmation_loaded", function(e, form_id) { | |
| // Send event with category 'Form', action 'Submit', label 'Contact Us', and value 100. | |
| ga('send', 'event', 'Form', 'Submit', 'Contact Us', 100); | |
| }); | |
| })(jQuery); |
| function exportSpreadsheet() { | |
| //All requests must include id in the path and a format parameter | |
| //https://docs.google.com/spreadsheets/d/{SpreadsheetId}/export | |
| //FORMATS WITH NO ADDITIONAL OPTIONS | |
| //format=xlsx //excel | |
| //format=ods //Open Document Spreadsheet | |
| //format=zip //html zipped | |
| (function( $ ){ | |
| 'use strict'; | |
| function auto_fit_soliloquy( parent_selector ){ | |
| // resize the slider container | |
| var $soliloquy = $( parent_selector + ' .soliloquy-container'), | |
| $all_items = $('.soliloquy-slider,.soliloquy-viewport,.soliloquy-item', $soliloquy ), | |
| $container = $('.soliloquy-item', $soliloquy ), | |
| window_height = $(window).height(); |