I hereby claim:
- I am hyshai on github.
- I am hyshai (https://keybase.io/hyshai) on keybase.
- I have a public key whose fingerprint is E04A 7157 776D B8E0 8D81 A5B5 C2B0 32C3 7FC2 5B81
To claim this, I am signing this object:
| # Script to sync Pythonista files to Dropbox | |
| # Author: David Hutchison | |
| # www: http://www.devwithimagination.com/ | |
| import webbrowser, os, pprint | |
| import dropbox | |
| import hashlib | |
| import json | |
| import difflib | |
| import sys |
| from bs4 import BeautifulSoup | |
| import requests | |
| import re | |
| import clipboard | |
| nuzzle = clipboard.get() | |
| url = re.search("^http.+",nuzzle,re.MULTILINE) | |
| url = url.group(0) | |
| resp = requests.get(url) |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| #-*- coding:utf-8 -*- | |
| """Download Zip bundle of Python package requirements for MarkdownPDF.py | |
| and extract them to 'site-packages' sub-directory. | |
| This is meant for Pythonista (an iOS app) users as an easy way to install | |
| these packages. | |
| Packages included in the Zip bundle: |
| welcome_msg = '''url_lengthener is a poor man's CleanLinks. | |
| See: https://itunes.apple.com/us/app/clean-links/id623671942?mt=8 | |
| It takes a shortened url and returns the lenthened url. | |
| The inbound shortened url can either be provided as a command line | |
| argument or on the iOS clipboard. | |
| url_lengthener follows all header redirects, instead of downloading | |
| the entire webpage as CleanLinks does, | |
| (See: https://twitter.com/gcaprio/status/418040618636435456) | |
| which 1) saves you bandwidth and 2) doesn't register as a click (at least for bit.ly) |
| from sys import argv | |
| import notification | |
| #this will open the url right away without tapping on the notification | |
| notification.schedule(argv[1],1,'',argv[2]) |
| import base64 | |
| import requests | |
| import clipboard | |
| import webbrowser | |
| from sys import argv | |
| import urllib | |
| img = requests.get(clipboard.get()).content | |
| f=base64.b64encode(img) | |
| html = '<img src="data:image/png;base64,{0}" />'.format(f) | |
| clipboard.set(html) |
| //photo.hbs | |
| /*snip*/ | |
| {{#each album in albums}} | |
| {{#link-to 'albums.album' album}} | |
| {{album.name}} //this loads properly | |
| {{/link-to}} | |
| {{/each}} | |
| //routes/albums.js | |
| model: function(params) { |
| //PhotoIndex Route | |
| export default Ember.Route.extend({ | |
| model:function() { | |
| var store = this.get('store'); | |
| return store.find('photo', 1); | |
| } | |
| }); | |
| //PhotosAdapter | |
| export default Ember.FixtureAdapter.extend(); |
| #!/bin/bash | |
| img=/Users/$USER/Downloads/tmp64.img | |
| pbpaste 2>&1 | wget --quiet -i - -O $img&& | |
| echo "<img src=\"data:image/png;base64,$(base64 $img)\" />" | pbcopy && | |
| rm $img |