Skip to content

Instantly share code, notes, and snippets.

View katydecorah's full-sized avatar

Katy DeCorah katydecorah

View GitHub Profile
katydecorah / email-drafter.js
Last active July 19, 2023 22:06
Draft emails in Gmail from a Google spreadsheet and a Google doc template:
// What is the Google Document ID for your email template?
var googleDocId = "abcd0000abcd0000abcd0000abcd0000";
// Which column has the email address? Enter the column row header exactly.
var emailField = 'Email';
// What is the subject line?
var emailSubject = 'You\'re bringing {Type}!';
// Which column is the indicator for email drafted? Enter the column row header exactly.
var emailStatus = 'Date drafted';
/* ----------------------------------- */
katydecorah / script.js
Last active March 27, 2021 19:28
Draft emails in Gmail from a Google spreadsheet
function draftMyEmails() {
var sheet = SpreadsheetApp.getActiveSheet(); // Use data from the active sheet
var startRow = 2; // First row of data to process
var numRows = sheet.getLastRow() - 1; // Number of rows to process
var lastColumn = sheet.getLastColumn(); // Last column
var dataRange = sheet.getRange(startRow, 1, numRows, lastColumn) // Fetch the data range of the active sheet
var data = dataRange.getValues(); // Fetch values for each row in the range
We can't make this file beautiful and searchable because it's too large.
34.5337_083.9849|DAHLONEGA PUBLIC (X3450840)|34.53370|-83.98490|1467 feet|snowfall|2015-01-27 14:00|0.001|in|24.000|hours|30533|
34.8722_085.5094|TRENTON EMERGENCY MNGR (X3490855)|34.87220|-85.50940|751 feet|snowfall|2015-01-27 14:00|0.100|in|24.000|hours||
34.8761_083.9584|BLAIRSVILLE EMERGENCY MNGR (X3490840)|34.87610|-83.95840|1890 feet|snowfall|2015-01-27 14:00|0.001|in|24.000|hours|30512|
34.9157_085.1094|RINGGOLD FIRE DEPT/RESCUE (X3490851)|34.91570|-85.10940|761 feet|snowfall|2015-01-27 14:00|0.001|in|24.000|hours|30736|
34.9488_083.7564|HIAWASSEE EMERGENCY MNGR (X3490838)|34.94880|-83.75640|1978 feet|snowfall|2015-01-27 14:00|0.001|in|24.000|hours|30546|
34.9776_085.3578|LOOKOUT MOUNTAIN EMERGENCY MNGR (X3500854)|34.97760|-85.35780|1804 feet|snowfall|2015-01-27 14:00|0.200|in|24.000|hours||
35.1810_083.3818|FRANKLIN (X3520834)|35.18100|-83.38180|2110 feet|snowf
### Keybase proof
I hereby claim:
* I am katydecorah on github.
* I am katydecorah ( on keybase.
* I have a public key whose fingerprint is 56F3 71FF 4A8F 07F9 5434 7256 B9C6 BB16 DABD 9ABB
To claim this, I am signing this object:
katydecorah / rdio-playlist-bookmarklet.js
Last active August 29, 2015 13:57
Export an Rdio playlist to YAML. The code is a bit hacky, but it does the trick for now. [1] Make sure playlist is fully loaded. [2] open Share modal. [3] hit the bookmarklet [adapted from here]( [4] i love you.
javascript: (function () {
var a = {
init: function () {
parse: function () {
page = "";
var e = $(".playlist_name").find(".name").text();
var d = $(".short_link").find("input").val();
var c = $(".catalog_art .ImageLoader").attr("src");
$labelInc: 35;
@each $category in $categories {
.label-#{$category} {
background: rgba(adjust-hue($blue,$labelInc),0.5);
border-color: rgba(adjust-hue($blue,$labelInc),0.5);
&:hover {background: darken(rgba(adjust-hue($blue,$labelInc),0.5),15%);}
$labelInc: $labelInc + 35;
$categories : "edibles","adventures","code","playlists","freelance";
.label {
background: rgba($blue,0.5);
border-color: rgba($blue,0.5);
border-radius: 0.25em;
color: #fff;
display: inline-block;
margin: 0.3em;
padding: 0.25em 0.75em;
&:hover {
background: darken(rgba($blue,0.5),15%);
katydecorah / google-maps-static-image-generator
Last active November 23, 2016 11:22
Generate a static Google Maps image for Jekyll posts.
{% if page.locations %}
<img src="{% for location in page.locations %}{% if forloop.first %}center={{location}}&markers=color:blue%7C{{location}}{% else %}&markers=color:blue%7C{{location}}{% endif %}{% endfor %}&zoom={% if page.zoom %}{{page.zoom}}{% else %}13{% endif %}&size=300x200&scale=2&sensor=false&visual_refresh=true" alt="">
{% endif %}