Skip to content

Instantly share code, notes, and snippets.

@abrkn
abrkn / cryptowatch-historical-rates.gs
Last active March 20, 2018 01:30
Cryptowatch Historical Rates for Google Apps Script
// cryptowatch-historical-rates.gs
// Cryptowatch Historical Rates for Google Apps Script
// Version: 1.0
//
// Usage:
// =fetchCryptowatchRateFor("bitfinex", "BCHUSD", "2018-03-01")
// =fetchCryptowatchRateFor("bitfinex", "BCHUSD", "2018-03-01", "open")
// Defaults to closing price
function fetchCryptowatchRateFor(venue, symbol, date, which) {
var index = ['open', 'high', 'low', 'close'].indexOf(which || "close");
@RadGH
RadGH / recalculate-acf-locations.php
Last active July 19, 2023 19:16
Get latitude and longitude for addresses saved in Advanced Custom Fields, using Google's GeoLocation API
<?php
global $acf_recalc_settings;
// IMPORTANT: Customize these settings for your website.
$acf_recalc_settings = array(
// How many updates to do each page load. As of November 2018, Google's GeoLocation API limit is 100 per second.
'posts_per_run' => 16,
@omurphy27
omurphy27 / WooCommerce - Change Wrapping Markup through Main Content Action Hook.php
Last active September 10, 2022 04:21
WooCommerce - Change Wrapping Markup through Main Content Action Hook.php
<?php
// add core markup to woocommerce pages
add_action('woocommerce_before_main_content', 'woocommerce_output_content_wrapper');
// overwrite existing output content wrapper function
function woocommerce_output_content_wrapper() {
echo '<div class="main-bg no-top-banner">
<div class="container">
<div id="content" class="row" >
<div id="main" class="col-md-9 pull-right clearfix" >';
@DevinWalker
DevinWalker / gravity-forms_bootstrap
Last active November 28, 2023 20:35
Gravity Forms Twitter Bootstrap CSS Styles Turn OFF Gravity Forms CSS Turn On HTML5 See: http://roots.io/style-gravity-forms-with-bootstrap/
/* ------------------------------------
Gravity Forms
---------------------------------------*/
.gform_wrapper ul { padding-left: 0; list-style: none }
.gform_wrapper li { margin-bottom: 15px }
.gform_wrapper form { margin-bottom: 0 }
@NateJacobs
NateJacobs / gist:1286583
Created October 14, 2011 08:40
WordPress Function: Every time a user updates his/her profile an email is sent to the site administrator.
<?php
/**
* Updated User Profile Notification
*
* Every time a user updates his/her profile an email is sent
* to the site administrator.
*
* @author Nate Jacobs
* @link https://gist.github.com/1286583
*/
@markjaquith
markjaquith / disable-plugins-when-doing-local-dev.php
Created June 24, 2011 10:24
Disables specified WordPress plugins when doing local development
<?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/
*/