system.cpu.idle
: % Idle CPUsystem.cpu.system
: % System CPUsystem.cpu.user
: % User CPU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Gmail/Inbox Email Purge Script | |
// Using Google Script | |
// Clears out all emails older than X days | |
// Labels | |
function multipleLabels() { | |
var myLabels = { | |
'"Updates"': "7d", | |
'"Forums"': "7d", | |
'"Promotions"': "7d", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Gmail Message Snoozing | |
Quick implementation to allow snoozing of unread messages in Gmail | |
Usage: | |
The move unread emails into a snooze label for the desired snooze time. After | |
the specified time, the message should be moved back into your inbox. This will | |
only effect unread emails to prevent messages from continuing to bounce back |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function installScript() { | |
// Makes sure that only 1 scheduler is installed | |
uninstallScript(); | |
// Trigger every 1 hour. | |
ScriptApp.newTrigger('gmailScheduler') | |
.timeBased() | |
.everyHours(1) | |
.create(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name gmail-enhancer | |
// @namespace gmail-enhancer | |
// @description gmail-enhancer UX experience | |
// @include https://mail.google.com/mail/* | |
// @version 1.2 | |
// @grant none | |
// ==/UserScript== | |
(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This script retrieves contents of Gmail Inbox and leaves only | |
// predefined amount of last messages. Old messages will be | |
// moved to archive. | |
function cleanOld(){ | |
var old_threads = GmailApp.getInboxThreads(); | |
var leave = 30; | |
if (old_threads.length>=leave){ | |
for (var i=leave; i<old_threads.length; i++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var LABEL = 'Snooze'; | |
var MONTHS = 1; | |
var MARK_UNREAD = true; | |
var ADD_UNSNOOZED_LABEL = true; | |
function dailySnooze() { | |
var today; | |
var page; | |
var d = new Date(); | |
var day = d.getDate(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var my_teams = ["@github/css", "@github/design"] // Add any teams you want autodetected to this list | |
var base_label = ["GitHub"] | |
var my_teams_regex = new RegExp('(' + my_teams.join('|') + ')') | |
function GitHubThread(thread) { | |
this._thread = thread | |
// Determine why we got this message and label the thread accordingly. | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To load this script, open a Google Sheet (yeah, weird I know), then select "Tools->Script Editor" | |
// From there, past this content into a script. You can set up triggers to run this script every day at a certain time | |
// by selecting Resources -> Triggers. | |
// I recommend you set the trigger to every 5-10 minutes. This will let the batches complete. If the trigger is too infrequent, it wont have time to finish. | |
// https://developers.google.com/apps-script/reference/gmail/ | |
// For large inboxes (the ones you want to analyze) gmail will rate limit you. | |
// They recommend adding a sleep to call less, but then your exec time will be too long. | |
// To solve this, we run in batches. This is the batch size. Decrease this if exec time is too long. |