Skip to content

Instantly share code, notes, and snippets.

View prenagha's full-sized avatar

Padraic Renaghan prenagha

View GitHub Profile
@prenagha
prenagha / pdfpenocr.scpt
Created November 10, 2011 14:57
applescript folder action to have docs ocr'd by pdfpen
--
-- OCR all documents added to a folder
--
on adding folder items to this_folder after receiving added_items
try
repeat with i from 1 to number of items in added_items
set this_item to item i of added_items
set appName to my getAppName()
tell application appName
activate
@prenagha
prenagha / Dial with GrowlVoice.scpt
Created March 9, 2012 01:37
LaunchBar dial phone via GrowlVoice
--
-- Use GrowlVoice (version 2.0 or later) to dial a phone number from LaunchBar
-- http://www.growlvoice.com/
--
-- To Use:
-- Put this script in ~/Library/Application Support/LaunchBar/Actions
-- In LaunchBar preferences, Actions screen, Default Actions tab,
-- set the Phone Numbers field to this script
-- This script will appear by default as the action for a phone number, invoke it
-- to start a call to that number in GrowlVoice
@prenagha
prenagha / Text with GrowlVoice.scpt
Created March 9, 2012 01:38
LaunchBar text phone via GrowlVoice
--
-- Use GrowlVoice (version 2.0 or later) to dial a phone number from LaunchBar
-- http://www.growlvoice.com/
--
-- To Use:
-- Put this script in ~/Library/Application Support/LaunchBar/Actions
-- This script will appear as an action for a phone number, invoke it
-- to start a text to that number in GrowlVoice
--
on handle_string(s)
@prenagha
prenagha / Prowl.scpt
Created June 22, 2012 18:40
Launchbar to Prowl
--
-- Take text input from a launchbar action and send to iPhone via prowl
-- Put this file as ~/Library/Application Support/Launchbar/Actions/Prowl.scpt
-- Update prowlAPIKey in the script below
-- Then enter Launchbar, type "Prowl", once its selected hit "Space", then type
-- the text you want to send to your phone, hit "Enter"
--
on handle_string(s)
set prowlAPIKey to "xxxxxx"
set prowlURL to "https://prowl.weks.net/publicapi/add"
@prenagha
prenagha / bulkUnwatch.sh
Created July 12, 2012 15:33
JIRA Bulk Unwatch
#
# Bulk Unwatch
# JIRA doesn't support unwatch from the bulk change action
# This script fills the gap
# Known to work with JIRA 5 via the REST API
#
# 1. Using JIRA, Issue Navigator, write a query to get all
# the issues you want to unwatch. Something like
# "issue in watchedIssues() AND status != Closed"
# works well as a starting point.
--
-- open currently open URL in Safari in Chrome
-- forked from https://gist.github.com/3151932
--
property theURL : ""
tell application "Safari"
set theURL to URL of current tab of window 1
end tell
if appIsRunning("Google Chrome") then
@prenagha
prenagha / safari.css
Created July 31, 2012 14:42
Safari User Stylesheet
html {
zoom: 1.2;
font: 16px Georgia;
}
img, video {
zoom: .8;
}
* {
/* wrap long strings of text without spaces */
word-wrap: break-word;
@prenagha
prenagha / VPN Toggle.scpt
Created November 5, 2012 15:16
VPN toggle applescript for launchbar
--
-- applescript to toggle connection state of vpn
-- http://markupboy.com/blog/view/toggling-vpn-with-applescript
-- http://www.plankdesign.com/blog/2012/06/toggle-your-network-settings-with-launchbar/
--
tell application "System Events"
tell current location of network preferences
-- set this to the name of your VPN config
set VPNservice to service "vpn service name"
set isConnected to connected of current configuration of VPNservice
@prenagha
prenagha / fluid-inotes.js
Created January 14, 2013 17:30
Javascript to use as a Userscript file within a custom Fluid app wrapper for Lotus Notes iNotes # Will update the app's doc badge with the current unread count # Will trigger alert sound and send a growl notification when new mail arrives http://fluidapp.com See also https://gist.github.com/4531763
// put this file somewhere on your Mac
// download jquery and put it there as well
// then in Fluid, under the Userscripts option set the path pattern to match your
// inotes UL, then add the below, tweak for your path
// window.fluid.include("/Users/userid/Documents/Mac/Fluid/jquery-1.8.3.min.js");
// window.fluid.include("/Users/userid/Documents/Mac/Fluid/fluid-inotes.js");
//
// Note the auto userid and password filling this script does. Obviously adjust to
// your info. Line ~108 below.
@prenagha
prenagha / fluid-inotes.css
Created January 14, 2013 17:35
CSS to use as a Userstyles file within a custom Fluid app wrapper for Lotus Notes iNotes. Will show overlay please wait after login. http://fluidapp.com see also https://gist.github.com/4531725
/* Start by setting display:none to make this hidden.
Then we position it in relation to the viewport window
with position:fixed. Width, height, top and left speak
speak for themselves. Background we set to 80% white with
our animation centered, and no-repeating */
div.loading {
display: block;
position: fixed;
z-index: 1000;