Skip to content

Instantly share code, notes, and snippets.

View voltechs's full-sized avatar

Dale voltechs

  • Notion, Twilight Coders
  • Denver
View GitHub Profile
@voltechs
voltechs / Calendar.gs
Last active January 4, 2021 18:10
Block time off from your personal calendar on your work calendar.
function getPrimaryCalendar() {
return CalendarApp.getDefaultCalendar();
}
function getSecondaryCalendar() {
debug(JSON.stringify(PropertiesService.getUserProperties()));
debug(JSON.stringify(PropertiesService.getScriptProperties()));
return CalendarApp.getCalendarById(calendarID());
}
@voltechs
voltechs / CombustionEngine.md
Last active December 4, 2020 15:23
Combustion Engine

For those of you who might be using your engine as a git submodule in a bigger project, here is what I've settled on (riffed a bit from pat/combustion#13 (comment)). I will admit that a bit of the final result is due to trail/error. For instance, I don't really know what the task :environment block does, but I know when I run rake db:migrate, it executes that block, and thus requires additional requires.

If someone else has a clearer understanding of how everything is fitting together, please let me know and I'll update

We do not need to modify db paths in the Rakefile because we've set those up as initializers in the engine.rb so that the main app pulls migrations and schema.rb from the core project. (Bonus points for loading FactoryBot factories to be reused in the main app!)