Skip to content

Instantly share code, notes, and snippets.

View m-miller's full-sized avatar

Martin Miller m-miller

View GitHub Profile
@m-miller
m-miller / google_search_console_daily.R
Created June 3, 2017 01:21 — forked from ryanpraski/google_search_console_daily.R
Download Google Search Console data (formerly webmaster tools) to R using searchConsoleR package. This script downloads data for the most recent day of search console data which is 3 days ago. Tutorial describing how to automate daily Google Search Console pulls using this script: http://www.ryanpraski.com/google-search-console-api-r-guide-to-ge…
## A script to download and archive Google search console analytics (formerly webmaster tools)
##
## searchConsoleR package created by Mark Edmondson (http://markedmondson.me)
##
## This script downloads and writes data to .csv for the most recent day of search console data (3 days ago)
## load the required libraries
## (Download them with install.packages("googleAuthR") and install.packages("searchConsoleR") if necessary
library(googleAuthR)
library(searchConsoleR)
@m-miller
m-miller / nav-menu-exporter-importer.php
Created January 25, 2017 04:17 — forked from hissy/nav-menu-exporter-importer.php
[WordPress Plugin] Nav Menu Exporter and Importer / Export and Import nav menus. Requires WordPress Importer plugin.
<?php
/*
Plugin Name: Nav Menu Exporter and Importer
Description: Export and Import nav menus. Requires WordPress Importer plugin
Author: hissy, megumi themes
Version: 0.1
Text Domain: nav-menu-exporter-importer
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
@m-miller
m-miller / soliloquy-remove-slideshow-button.php
Last active June 3, 2017 01:22
WordPress remove soliloquy slider button
<?php
/*
Plugin Name: Remove Soliloquy slider button from editor
* Plugin URI: http://soliloquywp.com
* Version: 1.0
* Author: Martin Miller
* Author URI: https://www.govdelivery.com
* Description: Remove the Add Slideshow button from all Visual Editors in WordPress
*/
@m-miller
m-miller / conditional_metabox.js
Created September 26, 2017 06:09
Wordpress conditional metabox on checked category
jQuery(document).ready(function() {
function metabox_category() {
// conditional show/hide metaboxes on checked category
var label = null;
var onemeta = jQuery('#id_of_custommetabox.postbox');
// get checked checkboxes
var ischecked = jQuery('#taxonomy_name_categorychecklist input[type="checkbox"]:checked');
var label = ischecked.parent().text().trim();
//console.log(label);
//console.log(ischecked.length);
@m-miller
m-miller / .babelrc
Created August 3, 2018 00:57 — forked from igorbenic/.babelrc
Integrating Gutenberg Blocks in Existing WordPress Plugins | https://www.ibenic.com/integrating-gutenberg-blocks-in-plugins
{
"presets": [
[
"env",
{
"modules": false
}
]
],
"plugins": [
@m-miller
m-miller / mutation observer.html
Created July 6, 2021 17:46
mutation observer boilerplate
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<!-- <div id='some-id'></div> -->
@m-miller
m-miller / post-commit
Last active December 16, 2023 14:03
post-commit hook for petkit dev feeder
#!/usr/bin/python3
from pypetkit import PetKitAPI
from settings import (
API_USERNAME,
API_PASSWORD,
API_COUNTRY_CODE,
API_LOCALE_CODE,
API_TIMEZONE,
)