This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onEdit(){ | |
const ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); | |
const entries = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("entries"); | |
const dropDowns = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("dropdowns"); | |
const activeCell = entries.getCurrentCell(); | |
const activity = activeCell.getValue(); | |
if(activeCell.getColumn() == 3 && activeCell.getRow() > 1){ | |
activeCell.offset(0,1).clearContent().clearDataValidations(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Skidmore Multisite Helpers | |
Plugin URI: https://github.com/ | |
Description: A network activated plugin used to house small functions that apply to all sites. | |
Version: 1.0 | |
Author: Tom Woodward et al. | |
Author URI: https://tomwoodward.us | |
License: GPL2 | |
License URI: https://www.gnu.org/licenses/gpl-2.0.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
section.part header h1, | |
section.chapter header h1, | |
.front-matter h5, | |
.part h5, | |
.chapter h5, | |
.back-matter h5, | |
body#tinymce.wp-editor h5, | |
.front-matter h2, | |
.part h2, | |
.chapter h2, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class td_block1_widget extends td_block_widget { | |
var $td_block_id = 'td_block_1'; // change only the block id, the rest is autogenerated | |
} | |
add_action('widgets_init', function (){ | |
register_widget("td_block1_widget"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"options": { | |
"bookmarkThumbHeight": 150, | |
"bookmarkThumbWidth": 90, | |
"leftPanelEnabled": true, | |
"limitLocales": true, | |
"minWidthBreakPoint": 610, | |
"navigatorEnabled": true, | |
"openTemplate": "http://universalviewer.io?manifest={0}", | |
"overrideFullScreen": false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function listFolders(folder) { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
sheet.appendRow(["Name", "Sharing Access", "Sharing Permission", "Get Editors", "Get Viewers", "Date", "Size", "URL", "Download", "Description", "Type"]); //writes the headers | |
var folder = DriveApp.getFolderById("YOUR_FOLDER_ID");//that long chunk of random numbers/letters in the URL when you navigate to the folder | |
var files = folder.getFiles();//initial loop on loose files w/in the folder | |
var cnt = 0; | |
var file; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Geolocation</title> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta charset="utf-8"> | |
<style> | |
html, body { | |
height: 100%; | |
margin: 0px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pb_add_glossary_item(){ | |
if (($handle = fopen(plugin_dir_path(__FILE__) . "test.csv", "r")) !== FALSE) { | |
while (($data = fgetcsv($handle, 1000, "\t")) !== FALSE) { | |
ini_set('auto_detect_line_endings',TRUE); | |
foreach ($data as $key => $line) { | |
// code... | |
$data_array = explode(",", $line); | |
$args = array( | |
'post_title' => $data_array[0], | |
'post_content' => $data_array[1], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import matplotlib.pyplot as plt | |
# Create a dictionary of GDP data for the USA and China from 2016 to 2020 | |
data = { | |
'Country': ['USA', 'China'], | |
'2016': [18624475, 11233273], | |
'2017': [19542968, 12408149], | |
'2018': [20580518, 13608152], | |
'2019': [21433226, 14271038], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//UPDATE wp_options with page count | |
function wmps_page_count(){ | |
$page_count = wp_count_posts('page')->publish; | |
if ( get_option( 'wpms_data_pages_count' ) !== false ) { | |
update_option('wpms_data_pages_count', $page_count); | |
} else { | |
add_option('wpms_data_pages_count', $page_count); | |
} | |
} |
NewerOlder