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 requests | |
import json | |
import time | |
import sys | |
def get_feed(access_token, feed_id, offset=0, limit=1000, read='false', published_since='1'): | |
feed_payload = {'access_token': access_token, 'read': read, 'feed_id': feed_id, 'offset': offset, 'published_since': published_since, 'limit': limit} | |
feed_r = requests.get('https://feedwrangler.net/api/v2/feed_items/list_ids', params=feed_payload) | |
feed_data = json.loads(feed_r.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
#!/usr/local/bin/python | |
import sys | |
from mutagen.mp4 import MP4 | |
m4a_file = sys.argv[1] | |
m4a = MP4(m4a_file) | |
length_secs = m4a.info.length |
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 subprocess | |
import re | |
try: | |
host = clipboard.get_selection() | |
host = host.strip() | |
pattern = re.compile("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$") | |
validHost = pattern.match(host) | |
if validHost: |
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
require 'rubycue' | |
require 'optparse' | |
options = {} | |
opts = OptionParser.new do |opts| | |
opts.on("-c", "--cue PATH", "Path to chesheet file") do |cue_file| | |
options[:cue] = cue_file | |
end | |
end |
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
require 'rss/maker' | |
require 'optparse' | |
require 'uri' | |
options={} | |
opts = OptionParser.new do |opts| | |
opts.on("-d", "--directory DIRECTORY", "Director of files") do |directory| | |
options[:directory] = directory | |
end |
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
module Jekyll | |
class AudioTag < Liquid::Tag | |
def initialize(tag_name, files, tokens) | |
super | |
@files = files | |
end | |
def render(context) | |
HTML << '<audio controls="controls">' | |
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
module BootstrapPaginationHelper | |
class LinkRenderer < WillPaginate::ActionView::LinkRenderer | |
protected | |
def page_number(page) | |
unless page == current_page | |
link(page, page, :rel => rel_value(page)) | |
else | |
link(page, "#", :class => 'active') | |
end |
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
require 'aws/s3' | |
require 'digest/md5' | |
require 'mime/types' | |
## These are some constants to keep track of my S3 credentials and | |
## bucket name. Nothing fancy here. | |
AWS_ACCESS_KEY_ID = ENV['S3_KEY'] | |
AWS_SECRET_ACCESS_KEY = ENV['S3_SECRET'] | |
AWS_BUCKET = ENV['S3_BUCKET'] |
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
#!/bin/bash | |
#transcode.sh | |
#By Don Southard aka @binaryghost | |
# | |
#[UPDATE 6/01/2011 08:01:15PM] | |
#Idea and initialcode for Alfred progress bar by Andreas Heiberg | |
#Completly rewritten code by Don Southard | |
# | |
#[UPDATE 6/02/2011 08:58:09PM] | |
#Support for queueing, added information about queue status and ETA'S and the move the old file to trash feature |
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
tell application "Mail" | |
set theSelectedMessages to selection | |
set theMailbox to "[Gmail]/All Mail" | |
repeat with theMessage in theSelectedMessages | |
set messageAccount to account of mailbox of theMessage | |
tell application "Mail" | |
move the theMessage to mailbox theMailbox of messageAccount | |
end tell | |
end repeat |
NewerOlder