Skip to content

Instantly share code, notes, and snippets.

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

confluencepoint confluencepoint

:octocat:
Focusing
View GitHub Profile
@cclauss
cclauss / installNyamuk.py
Created March 9, 2013 09:47
Using nyamuk on Pythonista on iOS. > Download from github the nyamuk Python library and install it for Pythonista on iOS.
#!/usr/bin/env python
# installNyamuk -- https://github.com/iwanbk/nyamuk
# download from github the nyamuk Python library and install it for Pythonista on iOS
#import nyamuk, sys # uncomment if you want to test if nyamuk is already installed
#print('got it...')
#sys.exit()
import os, shutil, urllib, zipfile
# Script posted at: http://n8henrie.com/2013/02/quickly-import-pythonista-scripts-via-textexpander-or-bookmarklet
# Script name: Import Pythonista Script from Clipboard
# I got help from here: http://twolivesleft.com/Codea/Talk/discussion/1652/what-others-do%3A-pythonista/p1
# I got help from here: http://www.macdrifter.com/2012/09/pythonista-trick-url-to-markdown.html
import clipboard
import urllib2
import editor
import os
@robby1066
robby1066 / deal-with-me-google-apps-script.js
Last active March 20, 2021 22:14
A short Google Apps script that will label any starred items in your inbox that are older than 14 days with a "DEAL WITH ME" label. Go to https://developers.google.com/apps-script/reference/gmail/ for documentation.
/**
* Get the "DEAL WITH ME" label, or create it if it doesn't exist
* This is called by the other two functions, you shouldn't need to call it directly
*/
function _getNaggingLabel() {
/**
* If you'd like your label to say something different, modify it here
*/
var nagging_label_text = "DEAL WITH ME";
@wcaleb
wcaleb / iMDtoPDF.py
Last active July 8, 2024 08:17
iMDtoPDF
#! /usr/bin/env python
# -*- coding: utf-8 -*-
## iMDtoPDF.py
## by W. Caleb McDaniel
## http://wcm1.web.rice.edu
## This is a wrapper script for sending documents to Docverter
## for conversion from markdown to PDF using Pandoc. Typically
## Docverter calls are made with cURL; this script uses httplib.
# -*- coding: utf-8 -*-
"""
replacer.py:
2013-04-29
(c) 2013 Richard Careaga, all rights reserved.
Subject to license terms and conditions at
http://richard-careaga.com/lic2013.txt
install this script to your pythonista.app top-level directory
@skopp
skopp / pythonista.rst
Created May 1, 2013 08:59
Code like a Pythonista - Tutorial

Code Like a Pythonista: Idiomatic Python

@jbwhaley
jbwhaley / QuickReminder.py
Last active December 9, 2018 07:25
QuickReminder
# QuickReminder 3.0.2 - see: http://jarrodwhaley.com/other-projects/geekery/
import sys
import urllib.request, urllib.parse, urllib.error
import notification
import console
import webbrowser
# Get arguments, if any
import urllib2, urlparse, sys, webbrowser
itags = {'45': 'webm_720p',
'44': 'webm_480p',
'43': 'webm_360p',
'38': 'mp4_3072p',
'37': 'mp4_1080p',
'36': 'phone_mp4_240p',
'35': 'flv_480p',
'34': 'flv_360p',
@omz
omz / ShortURL.py
Created May 17, 2013 04:17
ShortURL
# Simple URL shortener using is.gd
#
# Save this script as 'ShortURL' in Pythonista and add the
# bookmarklet below to Safari. The result is copied to the clipboard.
# Bookmarklet:
# javascript:window.location.href='pythonista://ShortURL?action=run&argv='+encodeURIComponent(window.location.href);
import clipboard
import re
In order for this to work you need ffmpeg. I tried with version 1.2.1.
1) Play the video you want to download in the browser
2) Inspect the video element on the page
3) Copy the video url from the page source (something like http://devstreaming.apple.com/videos/wwdc/2013/.../101/ref.mov)
4) In this url replace "ref.mov" with "iphone_c.m3u8" (for 960x540 resolution) or "atp.m3u8" if you want more (probably 720p?)
5) Execute `ffmpeg -y -i http://devstreaming.apple.com/videos/wwdc/2013/.../101/iphone_c.m3u8 output.mp4`
6) There is your video :)