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 'rubygems' | |
require 'hpricot' | |
require 'net/http' | |
class AlbumArt | |
@api_key = "yourapikey" | |
# get_artwork_url_for_size :size => "small" (|| medium || large) | |
# :artist => "Artist name", :album => "Album Name" | |
def self.get_url(params) |
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
post '/new' do | |
begin | |
paste = save_paste(params) | |
redirect "/#{paste.id}" | |
rescue ArgumentError, RuntimeError => e | |
liquid :new, :locals => { | |
:author => params[:author], | |
:desc => params[:desc], | |
:raw => params[:raw], | |
:error => e.message |
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
class Git | |
@@git_methods = [:add, :bisect, :branch, :checkout, :clone, :commit, :diff, :fetch, :grep, :init, :log, :merge, :mv, :pull, :push, :rebase, :reset, :rm, :show, :status, :tag] | |
def method_missing(method, *args, &block) | |
if(@@git_methods.include?(method.to_sym)) | |
key_value_options = args.delete(-1) if args[-1].kind_of?(Hash) | |
key_value_options ||= nil | |
command = 'git ' |
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
filetype off | |
call pathogen#runtime_append_all_bundles() | |
filetype plugin indent on | |
set nocompatible | |
set modelines=0 | |
set smarttab | |
set autoindent | |
set expandtab |