Skip to content

Instantly share code, notes, and snippets.

View zholmquist's full-sized avatar
🏠
Working from home

Zach Holmquist zholmquist

🏠
Working from home
View GitHub Profile

Gmail Filters

Catch newsletters and junk

Matches: ("opt-out" OR unsubscribe OR "viewing the newsletter" OR "privacy policy" OR enews OR "edit your preferences" OR "email notifications" OR "update profile" OR smartunsubscribe OR secureunsubscribe OR yahoogroups OR "manage your account" OR "group-digests") Do this: Skip Inbox, Apply label "Work/Newsletters"

Keep pesky calendar invites out of inbox

Matches: (subject:("invitation" OR "accepted" OR "rejected" OR "updated" OR "canceled event" OR "declined") when where calendar who organizer) Do this: Skip Inbox, Apply label "GTD/Follow up"

Keep 90% of Sales emails out of Inbox

@zholmquist
zholmquist / brivo.py
Created July 6, 2017 16:44
Slack Command + Brivo Access Control
import requests
import urlparse, boto3, json, base64
from slacker import Slacker
class BrivoAPI(object):
def __init__(self, *args, **kwargs):
self.access_token = None
self.api_key = args[0]
self.client_id = args[1]
### Keybase proof
I hereby claim:
* I am zholmquist on github.
* I am zholmquist (https://keybase.io/zholmquist) on keybase.
* I have a public key whose fingerprint is 9DE7 C498 8525 A97B 0DAD 7709 8769 E197 FC8D D602
To claim this, I am signing this object:
@zholmquist
zholmquist / gist:8749020
Created February 1, 2014 06:57
Launch Center Pro + Google Maps to get Transit Times.
comgooglemaps://?saddr=[[list|To Home=Main+Street+@+450+S,+Salt+Lake+City,+UT&daddr=Grandville+Ave.+@+10605+S,+South+Jordan,+UT&daddr=Grandville+Ave.+@+10605+S,+South+Jordan,+UT|To Work=Grandville+Ave.+@+10605+S,+South+Jordan,+UT&daddr=224+S+200+W,+Salt+Lake+City,+UT]]&directionsmode=transit
@zholmquist
zholmquist / gist:8501698
Created January 19, 2014 07:36
Using Launch Center Pro, Clear and TextExpander for my daily rituals.

// TextExpander Snippet Abbreviation: Take Medicine, Wallet, iPad, Laptop, Workout, Load Podcasts, Load RSS, Turn OFF front light Content: Take Medicine, Wallet, iPad, Laptop, Workout, Load Podcasts, Load RSS, Turn OFF front porch light.

// The URL clearapp://list/create?listName=[[list|Morning=Morning%20Ritual&tasks={{<>}}|Evening=Evening%20Ritual&tasks={{<>}}|Gym Morning=Gym%20Morning%20Ritual&tasks={{<><>}}]]

@zholmquist
zholmquist / Hazel + Evernote Logging
Last active May 19, 2017 00:39
Hazel Embedded AppleScript that logs filename to Evernote. I use this in a script that cleans up my Desktop and Downloads and files everything away.
tell application "Evernote"
tell application "Finder" to set file_name to (name of theFile)
set time_string to do shell script "date '+%H:%M:%S'"
set date_string to do shell script "date '+%Y-%m-%d'"
set message to "<p><b>" & time_string & "</b> | Moved <em>" & file_name & "</em></p>"
set matches to find notes date_string & " notebook:Log"
if (count of matches) is 1 then
set the_note to item 1 of matches
@zholmquist
zholmquist / gist:5685618
Last active December 17, 2015 22:59
Quick Gif Search with Alfred App v2 + Giphy
# Paste URL into your browser of choice.
# Note, this only works with single words due to the way Giphy does searches.
alfred://customsearch/Gif%20tagged%20%27%7Bquery%7D%27/gif/utf8/noplus/http://giphy.com/tags/{query}
@zholmquist
zholmquist / gist:2209206
Created March 26, 2012 19:56
canOpenURL - check if phone has apps installed.
/*
canOpenURL
Clear App ( http://www.realmacsoftware.com/clear/ ) checks if app exsits,
then unlocks a theme based on that app. In Clear, they check if you have
Tweetbot.
Example Usage:
BOOL hasTweetbotInstalled = [self checkIfPhoneCanOpenAppUrlScheme:@"tweetbot://"];
@zholmquist
zholmquist / gist:1279669
Created October 11, 2011 22:33
OAuth Popups
/* netflix oauth */
this.beginNetflixOAuth = function()
{
var popupParams = 'location=0,status=0,width=320,height=480';
self._netflixWindow = window.open('/login/', 'netflixWindow', popupParams);
self._netflixInterval = window.setInterval(self.completeNetflixConnect, 1000);
self.logEvent('Authentication', 'netflix', 'begin')
};
/* netflix is complete. */
@zholmquist
zholmquist / gist:658474
Created November 1, 2010 16:42
Forcing Landscape Mode on iOS Apps
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) ||
(interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}