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:
#!/usr/bin/sh | |
page_count=`pdfinfo $1 | grep Pages: | cut -d':' -f2 | tr -d ' '` | |
pages_per=10 | |
i=1 | |
while [[ $i -le $page_count ]]; do | |
echo $(( $i + 10 )) | |
gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -dFirstPage=$i -dLastPage=$(( $i + $pages_per )) -sOutputFile=output2$i.pdf $1 | |
i=$(( $i + $pages_per )) | |
done |
# 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(); |