This file contains hidden or 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
| # 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. |
This file contains hidden or 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
| /* 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"; |
This file contains hidden or 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
| <?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> |
This file contains hidden or 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
| # 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 |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| 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 |
This file contains hidden or 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 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) |
This file contains hidden or 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 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 | |
| } |
This file contains hidden or 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 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)) |
This file contains hidden or 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
| # 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') | |
| # |