Skip to content

Instantly share code, notes, and snippets.

View kirillzubovsky's full-sized avatar
💭
High on catnip 🙀

Kirill Zubovsky kirillzubovsky

💭
High on catnip 🙀
View GitHub Profile
@kirillzubovsky
kirillzubovsky / script.js
Created June 7, 2019 07:07 — forked from katydecorah/script.js
Draft emails in Gmail from a Google spreadsheet https://katydecorah.com/code/google-sheets-to-gmail/
View script.js
var EMAIL_DRAFTED = "EMAIL DRAFTED";
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
View bash_profile
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
CYN='\e[1;96m'
# git dirty branch
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "(._.)"
}
function parse_git_clean {