I hereby claim:
- I am Achillefs on github.
- I am magus (https://keybase.io/magus) on keybase.
- I have a public key whose fingerprint is 2956 6B17 6EB2 1F74 D63A 4EEA 3A7A 7022 8708 136C
To claim this, I am signing this object:
class SitemapGenerator | |
# For Rails 3.*, replace with include Rails.application.routes.url_helper | |
include ActionController::UrlWriter | |
def initialize model_name, options = {} | |
@host = options.delete(:host) || default_url_options[:host] | |
@model_name = model_name | |
@file = options.delete(:file) || model_name.to_s.pluralize | |
@changefreq = options.delete(:changefreq) || 'daily' | |
@lastmod = options.delete(:lastmod_method) || :updated_at |
require 'rubygems' | |
require 'open-uri' | |
require 'json' | |
require 'net/http' | |
# Please note that the vanilla wp-json-api plugin does not support user authentication for create_post. | |
# Check out my fork for authentication support: https://github.com/Achillefs/wp-json-api | |
class Article | |
API_URI = 'http://mywpblog.com/api/' | |
API_USER = 'my_wp_username' |
class String | |
def links | |
self.scan /<a href\=\"[^"]*\"[^>]*>[^<]*<\/a>/ | |
end | |
def images | |
self.scan /<img src\=\"[^"]*\"[^>]*>/ | |
end | |
end |
I hereby claim:
To claim this, I am signing this object: