Skip to content

Instantly share code, notes, and snippets.

View prenagha's full-sized avatar

Padraic Renaghan prenagha

View GitHub Profile
@prenagha
prenagha / lbdist.sh
Last active January 27, 2022 17:30
Launchbar Action package script
#!/bin/bash
#
# code sign and package each launchbar action then push
# to dropbox folder for public distribution
#
# first make sure everything is compiled
# see https://gist.github.com/prenagha/404284fee1b8ff86aec5
~/bin/compile-applescript.sh
if [ $? -ne 0 ]
This file has been truncated, but you can view the full file.
Date/Time: 2021-09-10 14:50:15.467 -0400
End time: 2021-09-10 15:48:19.923 -0400
OS Version: macOS 11.5.2 (Build 20G95)
Architecture: x86_64h
Report Version: 32
Share With Devs: Yes
Data Source: Stackshots
Shared Cache: 0C9EB0DE-F5CE-3AFC-8F08-0C6DB1E7FC44 slid base address 0x7fff20035000, slide 0x35000
@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.
@prenagha
prenagha / karabiner.json
Created June 14, 2017 03:14
Karabiner Elements Config for Basic vi-style movements and Hyper Key
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"rules": [
--
-- 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 / 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 / raindrop-add.sh
Created March 2, 2020 02:45
Add Link to Raindrop
#!/usr/local/bin/bash
URL="$1"
if [ -f "${URL}" ]
then
URL=`cat ${URL}`
fi
/usr/bin/curl --fail --silent \
--data "{ \"link\": \"${URL}\", \"collection\": { \"\$ref\":\"collections\", \"\$id\": 111 }}" \
@prenagha
prenagha / eagle-filer-bookmark-export.applescript
Created January 24, 2020 00:52
Eagle Filer export to Bookmark HTML file
#
# Export items from Eagle Filer into standard Netscape bookmark HTML format
# Suitable for importing into other services like Raindrop
# Select all records in Eagle Filer then run this script
#
set _filename to choose file name with prompt "Export Bookmarks" default name "eagle-bookmarks.html"
tell application "EagleFiler"
set _records to selected records of browser window 1
set _file to open for access _filename with write permission
set _lf to ASCII character 10
@prenagha
prenagha / Create Gist.scpt
Created January 13, 2014 15:17
Launchbar action to create public gist
--
-- gist support for launchbar
-- 1. install gist client "sudo gem install gist"
-- https://github.com/defunkt/gist
-- 2. login "gist --login"
--
-- use from launchbar as file action, string/search action, or
-- plain action (will take text from clipboard)
-- then will put gist url as launchbar result
-- from there you can Copy it or hit Enter to open in browser
@prenagha
prenagha / RedirectCanonical.js
Created September 2, 2019 15:45
Lambda@Edge to redirect from non-canonical (example.net) to canonical (example.com)
'use strict';
/**
* Deploy this Lambda@Edge, in Origin Request event,
* to a CloudFront distribution that hosts the
* NON-Canonical domains. It will redirect everything
* to the canonical version of the URL.
* And let CloudFront and browsers cache the redirect.
*/
exports.handler = (event, context, callback) => {