Give Gmail all-device “Mailbox-Style” Snooze Functionality Right Now (no add-on req’d)

Posted by on Sep 5, 2014 in updates | No Comments

Mailbox is awesome, but following the news that Dropbox added Condoleezza Rice to their Board of Directors (and Dropbox owns Mailbox), I found myself wanting something different.  What I loved most about Mailbox was the ability to snooze emails to some later date.  Come to find out, you can set this up with Gmail and it’s not hard at all!

It works using Google Apps Script, a JavaScript-based scripting language that you can set to add special functionality to your Google applications—including Gmail, Docs, Calendar, Contacts, and more.

The real beauty about this is that it works across all your devices and you don’t have to do anything special once it’s set up.

Here’s an easy step-by-step guide.

  1. Go to Google Drive and create a new spreadsheet.
  2. Save the spreadsheet as Gmail Snoozes for if you want to access it later.
  3. Choose Tools -> Script Editor

  4. Choose create script for Blank Project.
  5. Remove everything in the code window and paste this script:
    var MARK_UNREAD = false;
    var ADD_UNSNOOZED_LABEL = false;
    
    function do_setup() {
        GmailApp.createLabel("All Snoozes");
        GmailApp.createLabel("All Snoozes/Later");
        GmailApp.createLabel("All Snoozes/This Weekend");
        GmailApp.createLabel("All Snoozes/Tomorrow");
        GmailApp.createLabel("All Snoozes/Next Week");
        GmailApp.createLabel("All Snoozes/Next Month");
        GmailApp.createLabel("All Snoozes/Next Evening");
    }
    
    function do_move(glabel) {
        var page = glabel.getThreads(0, 100);
        if (page.length > 0) {
            GmailApp.moveThreadsToInbox(page);
            if (MARK_UNREAD) {
                GmailApp.markThreadsUnread(page);
            }
            if (ADD_UNSNOOZED_LABEL) {
                GmailApp.getUserLabelByName("unsnoozed").addToThreads(page);
            }
            glabel.removeFromThreads(page);
        }
    }
    function moveLaters() {
        do_move(GmailApp.getUserLabelByName("All Snoozes/Later"));
    }
    function moveWeekends() {
        do_move(GmailApp.getUserLabelByName("All Snoozes/This Weekend"));
    }
    function moveTomorrow() {
        do_move(GmailApp.getUserLabelByName("All Snoozes/Tomorrow"));
    }
    function moveNextWeek() {
        do_move(GmailApp.getUserLabelByName("All Snoozes/Next Week"));
    }
    function moveMonth() {
        do_move(GmailApp.getUserLabelByName("All Snoozes/Next Month"));
    }
    function moveEvenings() {
        do_move(GmailApp.getUserLabelByName("All Snoozes/Next Evening"));
    }
  6. Click the save button in the toolbar.  Give the script a name. “Gmail Snoozes” will work fine.
  7. Click the myFunction dropdown in the toolbar and choose do_setup(). This will create the labels in your Gmail account.  Run the script.
  8. You’ll be asked to connect/authenticate your Gmail account with your Docs script.
  9. After you do this, the script will execute and you can refresh Gmail (if you have it open) to see your new labels.
  10. Now you just have to associate events with the functions (moveLaters, moveNextWeek, etc).  Back in your Google Doc script, click Resources -> All Your Triggers.
  11. Click “No triggers set up. Click here to add one now.”
  12. Now you just need to create a new trigger for each snooze event. (Next Week would be a snooze event).
  13. Here’s an example of the first event.

    You can see that the moveLaters() function will run every 4 hours.  So if a Gmail is within that label, it will trigger and get moved back to the inbox.
    So the first is:
    moveLaters, Time-Driven, Hour Timer, Every 4 hours.
  14. I have the rest of mine set up as follows:
    moveNextWeek, Time-driven, Week timer, Every Monday, 8am to 9am
    moveTomorrow, Time-driven, Day timer, 8am to 9am
    moveWeekends, Time-driven, Week timer, Every Saturday, 9am to 10am
    moveMonth, Time-driven, Month timer, 1 (day of the month), 9am to 10am
    moveEvenings, Time-driven, Day timer, 6pm to 7pm
  15. Save your triggers, and your script then you can exit Google Docs. That’s it! Now all you have to do (regardless of your device) is label something you want to snooze. The script does the rest.

 

C n00bery continues

Posted by on Feb 14, 2014 in updates | No Comments

Competing admirably for the world’s most boring exercises! This one works with arrays, digit/character/whitespace counting. Also character in/out. woo!

Here’s hoping I get to build something interesting soon. Reminds me of doing scales when you first pick up a new instrument. You just want to get to the music. Patience, my boy. Patience.

#include <stdio.h>
    
int main() {
    int c, i, nwhite, nother;
    int ndigit[10];

    nwhite = nother = 0;
    for(i = 0; i < 10; ++i)
        ndigit[i] = 0;

    while ((c = getchar()) != EOF)
       if (c >= '0' && c <= '9')
           ++ndigit[c-'0'];
       else if (c == ' ' || c == '\n' || c == '\t')
           ++nwhite;
       else
           ++nother;
    printf("digits =");
    for (i = 0; i < 10; ++i)
        printf(" %d", ndigit[i]);
    printf(", white space = %d, other = %d\n",
        nwhite, nother);
} 

C is decidedly dry so far…

Posted by on Feb 13, 2014 in updates | No Comments

I mean C is basically JavaScript so far, with a slightly different syntax. Doesn’t stop the early chapters from being incredibly dull. I’ve decided to go as slow and casual as possible when starting out on a new language, so I don’t mind so much.

Let the fun continue!

Being a n00b again.

Posted by on Feb 12, 2014 in updates | No Comments

I’ve always been a front-end developer with longing, backend inspirations. I love the idea of building something from top to bottom. Front and back. From the design to the UI to the database. So I’ve decided to start filling in my developer gaps. Over the next year and a half, I’ve laid out a plan for myself to learn (or at least lay the foundation for applying) the following languages.

  • C, C++, Objective-C
  • Java
  • Applying the two above to Android/iOS
  • Perl
  • PHP
  • Python
  • Ruby
  • Ember, Node, etc
  • Advanced SQL

Over the next year, I plan to chronicle my learning experience and tidbits here.

So I’ve started with C.

So far it’s going well.  Here’s where I am today on Day One:

#include <stdio.h>

int main() {
    float fahr, celsius;
    float lower, upper, step;

    lower = 0;
    upper = 300;
    step = 20;

    fahr = lower;
    printf("fahr celsius\n");
    while (fahr <= upper) {
        celsius = 5 * (fahr - 32) / 9;
        printf("%3.0f %6.1f\n", fahr, celsius);
        fahr = fahr + step;
    }

    step = 20;
    celsius = lower;
    printf("\n\ncelsius fahr\n");
    while (celsius <= upper) {
        /* Multiply by 9, then divide by 5, then add 32 */
        fahr = (celsius * 9 / 5) + 32;
        printf("%3.0f %6.0f\n", celsius, fahr);
        celsius = celsius + step;
    }
}

Gotta start somewhere, right?

Pinboard Inlined: A Chrome and Safari Add-on

Posted by on Jan 24, 2014 in updates | No Comments

BIG F**KING IMPORTANT UPDATE! I’ve hit my API limit rather quickly. It’s not cheap to keep it going, so I’ve made this add-on invite only for now. If you want to make a small monthly donation for access, just email me and I’ll set you right up.

Hi there. You’ve probably heard of a bookmarking app called Pinboard. If you haven’t, allow me to introduce you. This is Pinboard:

Stark. White. Just a pile of links.

I’ve been a fan of the website for years, but I’ve often found myself frustrated by the lack of functionality. Why can’t it do more? Well good news, my friends. Now it can.

I’ve been working on a Chrome and Safari (Firefox as soon as I learn how to make a damned Firefox extension) add-on that adds some pretty great functionality to your beloved Pinboard.

YouTube

Vimeo

Soundcloud

Images

Wikipedia

Movie and TV Information

Oh, you might also be interested in my Pinboard addons for enhanced keyboard navigation on Pinboard Chrome – Safari — When combined the Pinboard Inlined, you have yourself something very powerful.

A Music Maker: My History

Posted by on Jan 1, 2014 in updates | No Comments

I was just reflecting earlier today and realized, I have been at this “making music and putting it online” thing for a long time.  Thanks to the magic of archive.org I was able to pull out some old versions of my site.  It was an interesting process to see how my styles (and design/development techniques) have evolved over the last 11 years.  Hilarious that they started out as old school MIDI files.  Here’s a look through history.

 

1999:

Media_httpgrabbygrabs_vhdmx

2001:

Media_httpgrabbygrabs_vyfih

2003:

Media_httpgrabbygrabs_sicmr

2005:

Media_httpgrabbygrabs_adduj

2007:

Media_httpgrabbygrabs_bfoco

2008:

Media_httpgrabbygrabs_wjndc

2010:

Media_httpgrabbygrabs_oibcx

2011:


2012:

2013:

And the process continues over at http://dep.fm/

Better Clipboard: An Chrome Add-on for keyboard shortcuts and more

Posted by on Jun 4, 2012 in updates | No Comments

Last updated: June 6, 2012

Better Clipboard enhances popular bookmarking site Clipboard.com.

Keyboard Shortcuts: By default, Clipboard doesn’t give you a whole lot of bookmark navigation or manipulation options. This will also enable you to “leap” to a tag without ever using the mouse. See below for the keyboard shortcuts that this extension will give you.

Clipboard.com Better Shortcuts:

? = show/hide this window

Navigation
n or ] = next clip/board
p or [ = previous clip/board
g then a = go to all clips
g then b = go to all boards
g then l = go to likes
g then n = go to notifications
g then j = jump to a new tag

Selected Bookmark
[enter] = open selected
c (then cmd-c) = copy selected clip url
r = add reply to clip*
e = edit tags/mentions of selected clip*

* works in list/item view only

Experimental
\ = enter 'type-ahead' to filter mode
h = toggle hide clutter

JUMP to a tag

Probably my personal favorite, with a quick “g, j” you can bring up a quick modal that allows you to dive in to a tag really quickly. For instance, “g, j” followed by “videos” would show me all of my bookmarks tagged “videos.”

Type-ahead! (experimental)

Just press “\” and you’re in “filter” mode. You can type-ahead mode and filter everything out of your view that doesn’t match what you type. Excellent! This is experimental and may have bugs.

I hope you find this helpful. Free free to leave comments or suggestions below.

Chrome User? Download Here!

My Mayday Project is Complete

Posted by on May 31, 2012 in updates | No Comments

Over at dep.fm I’ve been maintaining a project called Mayday where I wrote, recorded, and released one original song every day for the month. It was quite a project indeed. I’m thankful that it is over, because it was often hard to make time for it, but I did learn a lot about myself throughout the month. I definitely recommend the project for anyone interested in doing something creative.

Check it out here.

Better Pinboard: An Extension for keyboard shortcuts and more

Posted by on May 16, 2012 in updates | No Comments

Chrome User? Download Here!

Last updated: June 6, 2012

Better Pinboard enhances popular bookmarking site Pinboard.in.

Keyboard Shortcuts: By default, Pinboard allows you to jump around within the site, but doesn’t give you a whole lot of bookmark navigation or manipulation options. This will also enable you to “leap” to a tag or combination of tags without ever using the mouse. See below for the keyboard shortcuts that this extension will give you.

Navigation
n or ] = next bookmark/note
p or [ = previous bookmark/note
+ = add new URL
shift-n = add a new note
g then * = go to starred
g then p = go to private
g then l = leap to a new tab (comma separated)
g then w = go to written notes

Selected Bookmark/Note
e = edit
t = edit tags
s = toggle star
# = delete
x = mark as read (done)
[enter] or o = open selected
[shift-enter] = open selected in a new tab
v = open cached version
shift-v = open cached version in new tab
c (then cmd-c) = copy selected bookmark/note url

Others
h = toggles Hiding of peripheral content (minify view)
\ = enter “type-ahead” mode to filter the view (experimental)

LEAP to a tag or combo of tags
Probably my personal favorite, with a quick “g, l” you can bring up a quick modal that allows you to dive in to a tag or combination of tags really quickly. For instance, “g, l” followed by “videos,funny” would show me all of my bookmarks tagged “videos” and “funny.”

Minify Your Bookmark View by Hiding Noisy, Peripheral Information
With a quick keyboard shortcut ‘h’ you can hide all of that peripheral, noisy information and see a birds eye view of your bookmarks.

Type-ahead!
Just press “\” and you’re in “filter” mode. You can type-ahead mode and filter everything out of your view that doesn’t match what you type. Excellent!

“To Read” becomes “To Do”
We use Pinboard for lots of things. Not just articles, but videos, games, pictures. Not everything is something you “read.” One thing that has always bothered me about Pinboard is that this section is titled “To Read.” This extension also “renames” this section to “To do.” Furthermore, instead of marking things as “read,” you now mark things as “done.” I just think it works a lot better.

Mini Pinboard Access
With the click of the toolbar button, get access to your bookmarks from anywhere.

I hope you find this helpful. Free free to leave comments or suggestions below.

Download here.

Posted by on Apr 19, 2012 in updates | No Comments