Skip to content

Instantly share code, notes, and snippets.

View elicohenator's full-sized avatar
🎯
Focusing

Eli Cohen elicohenator

🎯
Focusing
View GitHub Profile
@elicohenator
elicohenator / coingecko.gs
Created July 30, 2021 13:17
CoinGecko functions for Google Sheets crypto value import
/** GECKOPRICE
* Imports CoinGecko's cryptocurrency prices into Google spreadsheets. The price feed is a ONE-dimensional array.
* By default, data gets transformed into a number so it looks more like a normal price data import.
* For example:
*
* =GECKOPRICE("BTC", "USD","$A$1")
*
*
* @param {cryptocurrency} the cryptocurrency ticker you want the price from
* @param {against fiat currency} the fiat currency ex: usd or eur
@elicohenator
elicohenator / cleanup-wordpress.php
Created May 20, 2021 06:47
WordPress Cleanup functions
<?php
/**
* Cleanup version 2021.5.20
* save to your theme and use from functions.php:
* require get_template_directory() . '/helpers/cleanup.php';
*/
/**
* Disable the emoji's
<?php
/*
* Changing WooCommerce City field to dropdown with predifned cities.
* Based on https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/
*/
function elicohenator_override_checkout_fields( $fields ) {
// Create args for city fields - same for shipping & billing
@elicohenator
elicohenator / functions.php
Last active January 31, 2017 16:50
Show all custom post types in At A Galnce window @ wordpress
// Add all CPT's to At A Glance
add_action( 'dashboard_glance_items', 'cpad_at_glance_content_table_end' );
function cpad_at_glance_content_table_end() {
$args = array(
'public' => true,
'_builtin' => false
);
$output = 'object';
$operator = 'and';