This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Use with Arq Backup www.arqbackup.com | |
# To write a backup complete marker file to Amazon AWS S3 | |
# Set as backup complete script in Arq settings for the backup destination | |
# See related script that checks these files arq-check.sh: | |
# https://gist.github.com/prenagha/c5d6c2ebf3de0a4f61afdf3610e57363 | |
# | |
arg=$1 | |
if [ -z "${arg}" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- run terminal command and return results directly back to launchbar | |
-- runs command using applescript which means under /bin/sh | |
-- switches to user home dir before running script | |
-- | |
-- take string from LaunchBar and run as command | |
on handle_string(theText) | |
try | |
set cmd to "cd ~ && " & theText |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
zoom: 1.2; | |
font: 16px Georgia; | |
} | |
img, video { | |
zoom: .8; | |
} | |
* { | |
/* wrap long strings of text without spaces */ | |
word-wrap: break-word; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" sVim Safari Extension settings | |
" https://github.com/flipxfx/sVim | |
let scrollstep = 120 | |
" Neat shortcuts | |
map "v" goToInput | |
map "c" lastClosedTab | |
map "e" quit | |
map "d" createHint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
import os | |
def lambda_handler(event, context): | |
default_region = os.environ.get('AWS_REGION', 'us-east-1') | |
retain_days = int(os.environ.get('RETAIN_DAYS', '30')) | |
session = boto3.Session() | |
client = session.client('ec2', region_name=default_region) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Use with Arq Backup www.arqbackup.com | |
# To check backup complete marker files in Amazon AWS S3 | |
# See related script that writes these files arq-complete.sh: | |
# https://gist.github.com/prenagha/f11e0b800d7f1a5733dab1289febad51 | |
# | |
set -e | |
trap 'notify' INT TERM ERR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const path = require('path'); | |
/** | |
* Redirects URI to default document. | |
* Any URI without an extension is assumed to be | |
* a directory reference and will have '/index.html' | |
* appended to the URI. | |
* Useful as Lambda@Edge on CloudFront Origin Request event |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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 |