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
# Source: https://gist.github.com/5212628 | |
# | |
# 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 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
# -*- coding: utf-8 -*- | |
# Created by Sebastian Jarsve | |
# 9. April 2013 | |
from scene import * | |
from sound import play_effect | |
from random import randint | |
def centered_rect(x, y, w, h): | |
return Rect(x-w/2, y-h/2, w, h) |
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 os, cmd, sys, re, glob, os.path, shutil, zipfile, tarfile, gzip | |
# Credits | |
# | |
# The python code here was written by pudquick@github | |
# | |
# License | |
# | |
# This code is released under a standard MIT license. | |
# |
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 Image | |
import ImageChops | |
import ImageDraw | |
import ImageFont | |
import ImageFilter | |
import clipboard | |
def draw_caption(img, text, outline=2, top=False): | |
text_img = Image.new('RGBA', img.size, (0, 0, 0, 0)) | |
draw = ImageDraw.Draw(text_img) |
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
# Simple installer script for using the Evernote SDK 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 | |
# 'evernote-sdk'. In order to be able to import it, you have to add that to | |
# your import path, like this: | |
# | |
# import sys | |
# sys.path.append('evernote-sdk') | |
# |
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
# Very simple SSH client for Pythonista | |
import paramiko | |
import console | |
ssh = paramiko.SSHClient() | |
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) | |
host = console.input_alert('Connect to') | |
user, passwd = console.login_alert('Login') | |
ssh.connect(host, username=user, password=passwd) | |
print 'Connected to %s. Type `exit` to disconnect.' % host |
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
# coding: utf-8 | |
'''Creates a zip archive of your Pythonista files and serves them via HTTP in your local network.''' | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
import os | |
import shutil | |
import tempfile | |
import shutil | |
PORT = 8080 |
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
from requests import get | |
from json import loads | |
from urllib import quote | |
from webbrowser import open | |
email = 'YOUR EMAIL' | |
password = 'YOUR PASSWORD' | |
r = get('https://draftin.com/api/v1/documents.json', auth=(email,password)) |
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
# Shows a list of the 10 top paid apps on the App Store. | |
print 'Loading...' | |
import feedparser | |
import console | |
print 'Fetching Feed...' | |
feed = feedparser.parse('http://itunes.apple.com/us/rss/toppaidapplications/limit=10/xml') | |
entries = feed['entries'] |
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
ZSH=$HOME/.oh-my-zsh | |
ZSH_THEME="gallois" | |
setopt HIST_FIND_NO_DUPS | |
setopt histignorealldups | |
alias x='exit' | |
alias desk='cd ~/Desktop' | |
alias rm='grm -v' |