Skip to content

Instantly share code, notes, and snippets.

@woodwardtw
woodwardtw / emailClean.js
Created Apr 20, 2021
little google custom function
View emailClean.js
function emailClean(input) {
let email = input.split("@")
let clean = email[0]
return clean;
}
View weather_example_script.js
function otherWeather(){
const ss = SpreadsheetApp.getActiveSpreadsheet();//gets your spreadsheet
const sheet = ss.getSheetByName('APIData');//gets the sheet in your spreadsheet with this name
const apiUrl = 'http://api.openweathermap.org/data/2.5/weather?zip=05753,us&appid=YOUR_API_KEY&units=imperial';//goes to the API
const response = UrlFetchApp.fetch(apiUrl);//gets the API data
const json = JSON.parse(response.getContentText());//treat it as json
const data = [json.dt,json.weather[0].main, json.main.temp, json.wind.speed];//get the data we want from the API
sheet.appendRow(data);//write it to the sheet
}
View sensusaccess_iframe.html
<iframe src="https://www.sensusaccess.com:347/web3/middlebury/" width="100%" height="2000px"></iframe>
View ns_cloner_options.txt
on: ns_cloner_process_init
clone_mode: core
teleport_full_network:
source_id: 5 //source site ID
target_title: text clone //destination title
target_name: testclone //destination url element
tables_to_clone[]: wp_5_commentmeta //default tables for a site with ID 5
tables_to_clone[]: wp_5_comments
tables_to_clone[]: wp_5_links
tables_to_clone[]: wp_5_options
@woodwardtw
woodwardtw / tklb.css
Last active Apr 2, 2021
tlkb.middcreate.net customization
View tklb.css
.thing-archive {
border-radius: 0;
border: 0;
box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);
-webkit-box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%)
}
a{
color: #0D395F;
}
@woodwardtw
woodwardtw / macal.css
Last active Feb 10, 2021
macal site custom css
View macal.css
/* remove the gray overlay in the header image */
.site-header:after { display: none; }
/* Adding custom RRU font */
h1, h2, h3, h4, h5, h6 {
font-family: "Auto1Regular", sans serif;
}
@woodwardtw
woodwardtw / default-wordpress-theme.css
Created Jan 27, 2021
hopefully I'll add more here when I think of it
View default-wordpress-theme.css
//not sure this really does anything but doesn't hurt
html {
-webkit-font-smoothing: antialiased;
}
//keeps the long urls or words from messing stuff
body {
overflow-wrap: break-word;
word-wrap: break-word;
-ms-word-break: break-all;
View matomoerror.txt
* /home/stats/public_html/core/Columns/Updater.php:
Error trying to execute the migration 'ALTER TABLE `piwi_log_visit` MODIFY COLUMN `visitor_count_visits` INT(11) UNSIGNED NOT NULL DEFAULT 0, MODIFY COLUMN `visit_total_interactions` MEDIUMINT UNSIGNED DEFAULT 0, MODIFY COLUMN `referer_name` VARCHAR(255) NULL, MODIFY COLUMN `referer_url` VARCHAR(1500) NULL, MODIFY COLUMN `config_browser_name` VARCHAR(40) NULL, ADD COLUMN `config_client_type` TINYINT( 1 ) NULL DEFAULT NULL, MODIFY COLUMN `location_region` char(3) DEFAULT NULL, MODIFY COLUMN `location_region` char(3) DEFAULT NULL;'.
The error was: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'location_region' in 'piwi_log_visit'
* /home/stats/public_html/core/Columns/Updater.php:
Error trying to execute the migration 'ALTER TABLE `piwi_log_visit` MODIFY COLUMN `visitor_count_visits` INT(11) UNSIGNED NOT NULL DEFAULT 0, MODIFY COLUMN `visit_total_interactions` MEDIUMINT UNSIGNED DEFAULT 0, MODIFY COLUMN `referer_name` VARCHAR(255) NULL, MODIFY CO
View becker-page.htmlm
<p><span style="font-size: 18pt;">My son and I have been watching Crash Course videos throughout the pandemic. He is 15. I am... older. I have learned as much from Crash Course as he has. These videos do a great job of explaining some basic concepts that are critical to understand before we begin exploring how the law applies to education.</span></p>
<p><span style="font-size: 14pt;">[NOTE: In total, there are ~37 minutes worth of video here, so plan accordingly]</span></p>
<p>&nbsp;</p>
<p><iframe src="https://player.pbs.org/viralplayer/2365622700/" width="512" height="332" allowfullscreen="allowfullscreen"></iframe> <iframe src="https://player.pbs.org/viralplayer/2365622697/" width="512" height="332" allowfullscreen="allowfullscreen"></iframe> <iframe src="https://player.pbs.org/viralplayer/2365622697/" width="512" height="332" allowfullscreen="allowfullscreen"></iframe> <iframe src="https://player.pbs.org/viralplayer/2365621395/" width="512" height="332" allowfullscreen="allowfullscreen"></iframe> <iframe
View asma-main.js
var buttons = document.querySelectorAll("button.status");
console.log(buttons);
var state = true;
buttons.forEach((button) => {
button.addEventListener('click', () => {
if( button.innerText === 'Not Completed'){
button.innerText = 'Course Completed';
}
else {