Skip to content

Instantly share code, notes, and snippets.

@HyShai
HyShai / Open iterm tab here
Last active September 17, 2015 15:31 — forked from gAmUssA/Open iterm tab here
Apple script to open an iterm2 tab from right-clicking on a file or folder in Finder.To use:(1) Open Automator(2) Create a new service(3) Change "Service receives selected" drop downs to "Files or folders" in "Finder"(4) Select "Run applescript" from the sidebar, then paste this script in and save
-- Adapted from these sources:
-- http://peterdowns.com/posts/open-iterm-finder-service.html
-- https://gist.github.com/cowboy/905546
--
-- Modified to work with files as well, cd-ing to their container folder
-- Modified to work with iTerm 2 night builds https://iterm2.com/applescript.html
on run {input, parameters}
tell application "Finder"
set my_file to first item of input
set filetype to (kind of (info for my_file))
var Agent = {};
Agent.check = function() {
var events = JSON.parse(this.memory('events') || '[]');
this.log('memory is: (' + typeof events + '):' + JSON.stringify(events));
var len = events.length;
var tags = (this.options('tags') || '').split(',');
var count = parseInt(this.options('count'), 10) || tags.length;
var delimeter = this.options('delimeter') || ',';
var tagPrefix = this.options('tagPrefix') || this.options('tagprefix') || '';
if (len === 0) {
Oauth2 Scope:
https://www.googleapis.com/auth/googlevoice
+https://www.googleapis.com/auth/contacts
+https://www.googleapis.com/auth/userinfo.email
+https://www.googleapis.com/auth/userinfo.profile
+https://www.googleapis.com/auth/googletalk
++++ Folder/Label counts
POST /rpc?prettyprint=false HTTP/1.1
Host: www.googleapis.com
# Script to sync Pythonista files to Dropbox
# Author: David Hutchison
# www: http://www.devwithimagination.com/
import webbrowser, os, pprint
import dropbox
import hashlib
import json
import difflib
import sys
#!/usr/bin/env python
#-*- coding:utf-8 -*-
"""Download Zip bundle of Python package requirements for MarkdownPDF.py
and extract them to 'site-packages' sub-directory.
This is meant for Pythonista (an iOS app) users as an easy way to install
these packages.
Packages included in the Zip bundle: