Skip to content

Instantly share code, notes, and snippets.

@kappa4
kappa4 / forwardAndLabelStarredEmails.gs
Last active February 27, 2024 05:20
Gmail Auto-Forward Starred Emails
FORWARD_DEST="forward_address@example.com"
function forwardAndLabelStarredEmails() {
var laterLabel = GmailApp.getUserLabelByName("@later");
if (!laterLabel) {
laterLabel = GmailApp.createLabel("@later");
}
var threads = GmailApp.search('is:starred');
var emailParts = Session.getActiveUser().getEmail().split('@')[1].split('.');
@kappa4
kappa4 / Synchronize a schedule from another calendar to a specific calendar.md
Created August 26, 2023 07:20
Synchronize a schedule from another calendar to a specific calendar

null

@kappa4
kappa4 / Sync a schedule from another calendar as a block schedule with a fixed title.md
Last active October 5, 2023 06:22
Sync a schedule from another calendar as a block schedule with a fixed title

Usage

  1. Create new Google Apps Script
  2. Paste files here
  3. Set your calendar id and source calendar's ids and their titles in setting.gs
  4. Add Google Calendar API as a service from left side of the editor
  5. Share calendars with target calendar at Google Calendar
  6. Test and authorization
  7. Set trigger on GAS
@kappa4
kappa4 / file0.txt
Last active May 31, 2018 10:36
インスタンスは生きているのに ElasticBeanstalk の監視から外れたので復帰させた ref: https://qiita.com/kappa4/items/846993d61b942d4b9a05
sudo kill $(ps -ef | grep "\[healthd\]" | awk '{ print $2 }')