Skip to content

Instantly share code, notes, and snippets.

View confluencepoint's full-sized avatar
:octocat:
Focusing

confluencepoint confluencepoint

:octocat:
Focusing
View GitHub Profile
@spencerogden
spencerogden / gistcheck.py
Last active August 8, 2023 14:43 — forked from Westacular/gistcheck.py
Script for use with Pythonista to allow Github Gists for script storage and retrieval. Copy script in full into a new script in Pythonista called "gitcheck". Run the script and it will create 4 scripts starting with "Gist". These can be added to the action menu. See comments for more details.
# Source: https://gist.github.com/4702275
#
# All-purpose gist tool for Pythonista.
#
# When run directly, this script sets up four other scripts that call various
# functions within this file. Each of these sub-scripts are meant for use as
# action menu items. They are:
#
# Set Gist ID.py - Set the gist id that the current file should be
# associated with.
@parzonka
parzonka / widescreen_with_thread_arcs.plist
Last active December 12, 2015 03:29
Custom MailMate (http://freron.com) layout for Mailboxes view. Extends the installed widescreen layout by adding a vertical thread arcs view at the right. See screen shot at https://www.dropbox.com/s/ujdz5mgifhpq8ke/mailmate-widescreen-threadarcs.png . Save it to `~/Library/Application Support/MailMate/Resources/Layouts/Mailboxes/widescreen_with…
/* Custom MailMate (http://freron.com) layout for Mailboxes view. Extends the installed widescreen
layout by adding a vertical thread arcs view at the right. Save it to
"~/Library/Application Support/MailMate/Resources/Layouts/Mailboxes/widescreen_with_thread_arcs.plist"
and it will be available after a restart of MailMate. */
{
name = "Widescreen with Thread Arcs";
rootViewer =
{
viewerType = "MmSplitView";
@tjluoma
tjluoma / Open Safari URL in Google Chrome.kmmacros
Created February 10, 2013 23:00
Keyboard Maestro macro to open the current URL in Safari in Google Chrome
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Activate</key>
<string>Normal</string>
<key>IsActive</key>
<true/>
<key>Macros</key>
@timpulver
timpulver / GetNameAndTitleOfActiveWindow.scpt
Created February 11, 2013 10:38
[AppleScript] Get Name of active window | Returns the name / title of the active (frontmost) window
# taken from user Albert's answer on StackOverflow
# http://stackoverflow.com/questions/5292204/macosx-get-foremost-window-title
# tested on Mac OS X 10.7.5
global frontApp, frontAppName, windowTitle
set windowTitle to ""
tell application "System Events"
set frontApp to first application process whose frontmost is true
set frontAppName to name of frontApp
@SlexAxton
SlexAxton / .zshrc
Last active April 30, 2026 08:09
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
cd /Applications/VLC.app/Contents/
mv -v Info.plist Info.plist.original
curl -L --output Info.plist http://bit.ly/vlcplist
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
@maddievision
maddievision / Drafts.py
Created March 4, 2013 02:41
Very simple wrapper for Drafts URL scheme for Pythonista http://omz-software.com/pythonista
import urllib
import webbrowser
URL_BASE = "drafts://x-callback-url/create?"
CALLBACK_URL_BASE = "pythonista://"
def do_action(actiontype,txt,cb=CALLBACK_URL_BASE):
surl = URL_BASE + 'text=' + urllib.quote(txt) + '&action=' + urllib.quote(actiontype) + '&x-success=' + urllib.quote(cb)
webbrowser.open(surl)
print "Action Complete"
def message(txt,cb=CALLBACK_URL_BASE):
do_action('Message',txt,cb)
@maddievision
maddievision / TweetBot.py
Created March 4, 2013 03:41
Very simple wrapper for TweetBot URL scheme for Pythonista http://omz-software.com/pythonista
import urllib
import webbrowser
CALLBACK_URL_BASE = 'pythonista://'
url = "tweetbot://x-callback-url/post?"
def tweet(txt,cb=CALLBACK_URL_BASE):
data = {
'text': txt,
'callback_url': cb
}
import sys
import subprocess
import tempfile
import urllib
text = sys.stdin.read()
chart_url_template = ('http://chart.apis.google.com/chart?'
'cht=qr&chs=300x300&chl={data}&chld=H|0')
chart_url = chart_url_template.format(data=urllib.quote(text))
@mcsquaredjr
mcsquaredjr / install_google_client.py
Created March 7, 2013 16:41
install_google_client
# Simple installer script for using the google-api-client in Pythonista
#
# This script should be run from the root directory. In order to keep things
# tidy, it installs the module and all its dependencies in a directory named
# 'google-api'. In order to be able to import it, you have to add that to
# your import path, like this:
#
# import sys
# sys.path.append('google-api')
#