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
#!/usr/bin/env ruby | |
require 'nokogiri' | |
require 'net/http' | |
require 'shellwords' | |
require 'json' | |
source = Net::HTTP.get('www.domain.com', '/thepagethathasthevideos/') | |
doc = Nokogiri::HTML(source) | |
ids = doc.css('a').map{ |a| a.attr('data-vimeoid') }.compact.uniq |
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
page '/podcast.xml', layout: false | |
# Methods defined in the helpers block are available in templates | |
helpers do | |
def podcast_source_path(article) | |
"source/audio/#{article.data.file}" | |
end | |
end |
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
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
# Add the following to your shell init to set up gpg-agent automatically for every shell | |
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
source ~/.gnupg/.gpg-agent-info | |
export GPG_AGENT_INFO | |
else |
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
#!/usr/bin/env ruby | |
require 'aws-sdk' | |
require 'json' | |
glacier = AWS::Glacier.new( | |
:access_key_id => "ID_GOES_HERE", | |
:secret_access_key => "SECRET_GOES_HERE" | |
) |
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
2012/06/08 10:39am,2,29,88,12,39,4,28,31,106,25,6,127,13,15,25 | |
2012/06/08 10:40am,2,29,88,12,39,4,28,31,106,25,6,127,13,15,25 | |
2012/06/08 10:41am,2,29,88,12,39,4,28,31,106,25,6,127,13,15,25 | |
2012/06/08 10:42am,2,29,88,12,39,4,28,31,106,25,6,127,13,15,25 | |
2012/06/08 10:43am,2,29,88,12,39,4,28,31,106,25,6,127,13,15,25 | |
2012/06/08 10:44am,2,29,88,12,39,4,28,31,106,25,6,127,13,15,25 | |
2012/06/08 10:45am,2,29,88,12,39,4,28,31,106,25,6,127,13,15,25 | |
2012/06/08 10:46am,2,29,88,12,39,4,28,31,106,25,6,127,13,15,25 | |
2012/06/08 10:47am,2,29,88,12,39,4,28,31,106,25,6,127,13,15,25 | |
2012/06/08 10:48am,2,29,88,12,39,4,28,31,106,25,6,127,13,15,25 |
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
Date/Time: 2012-11-06 12:50:52 +1000 | |
OS Version: 10.8.2 (Build 12C60) | |
Architecture: x86_64 | |
Report Version: 11 | |
Command: Tagalicious | |
Path: /Applications/Tagalicious.app/Contents/MacOS/Tagalicious | |
Version: 1.5.5 (1.5.5) | |
Parent: launchd [173] |
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
#!/usr/bin/env ruby | |
# A few helpful tips about the Rules file: | |
# | |
# * The string given to #compile and #route are matching patterns for | |
# identifiers--not for paths. Therefore, you can’t match on extension. | |
# | |
# * The order of rules is important: for each item, only the first matching | |
# rule is applied. | |
# |
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
module ActsAsTaggableOn | |
class TagList < Array | |
cattr_accessor :force_lowercase, :force_parameterize | |
self.force_lowercase = false | |
self.force_parameterize = false | |
private | |
# Remove whitespace, duplicates, and blanks. | |
def clean! |
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
compile '/' do | |
filter :erb | |
layout 'default' | |
end | |
compile '*' do | |
# item[:extension] returns 'html.erb' for multi-dotted filename | |
ext = item[:extension].nil? ? nil : item[:extension].split('.').last | |
if ext == 'erb' |
NewerOlder