Skip to content

Instantly share code, notes, and snippets.

View nikmartin's full-sized avatar

Nik Martin nikmartin

View GitHub Profile
@leewillis77
leewillis77 / enable-gpf-render-cache.php
Created May 4, 2017 11:17
Enable WooCommerce Google Product Feed extension feed item cache.
<?php
/*
Plugin Name: Enable WooCommerce GPF feed item cache.
Plugin URI: http://docs.woothemes.com/document/google-product-feed/
Description: Enables feed item caching in the Google Product Feed extension.
Version: 1.0
Author: Lee Willis
Author URI: https://plugins.leewillis.co.uk/
*/
// ==UserScript==
// @name Clean Up Signals notifier.
// @version 0.2
// @include https://api.getsignals.com/*
// @include https://app.getsignals.com/*
// @include chrome-extension://*
// @require //ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js
// ==/UserScript==
var cleanDiv = $(".over-limit-state");
@mkhatib
mkhatib / geo.js
Created May 24, 2013 02:55
A Javascript utility function to generate number of random Geolocations around a center location and in a defined radius.
/**
* Generates number of random geolocation points given a center and a radius.
* @param {Object} center A JS object with lat and lng attributes.
* @param {number} radius Radius in meters.
* @param {number} count Number of points to generate.
* @return {array} Array of Objects with lat and lng attributes.
*/
function generateRandomPoints(center, radius, count) {
var points = [];
for (var i=0; i<count; i++) {