Skip to content

Instantly share code, notes, and snippets.

UPDATE wp_posts SET guid = REPLACE (guid, 'http://localhost:8888', 'http://wa.flywheelsites.com');
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://localhost:8888', 'http://wa.flywheelsites.com');
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'http://localhost:8888','http://wa.flywheelsites.com');
@rwboyer
rwboyer / image_tag.rb
Created November 10, 2013 13:14
image_tag
module IMGtag
class ImageTag < Liquid::Tag
@img = nil
def initialize(tag_name, markup, tokens)
attributes = ['class', 'src', 'width', 'height', 'title']
if markup =~ /(?<class>\S.*\s+)?(?<src>(?:https?:\/\/|\/|\S+\/)\S+)(?:\s+(?<width>\d+))?(?:\s+(?<height>\d+))?(?<title>\s+.+)?/i
bundle exec middleman s3_sync
== LiveReload is waiting for a browser to connect
s3_sync Gathering the paths to evaluate.
Progress: |====================================================================|
s3_sync
Ready to apply updates to test.rwboyer.com.
s3_sync Creating 2011/05/31/i-am-american/index.html
s3_sync Creating 2011/06/02/whats-wrong-with-this-color-management-picture/index.html
s3_sync Creating 2011/06/18/imac-27-sandy-bridge-update/index.html
s3_sync Creating 2011/06/20/my-strange-masochistic-foveon-desire/index.html
bundle exec middleman s3_sync rvm:ruby-2.0.0-p247
== LiveReload is waiting for a browser to connect
s3_sync Gathering the paths to evaluate.
s3_sync ============================================================== |
Ready to apply updates to test.rwboyer.com.
s3_sync Creating 2010/02/07/new-aperture-ebook/index.html
s3_sync Creating 2010/02/08/aperture-adjustment-controls-beyond-the-sliders/index.html
s3_sync Creating 2010/02/08/small-strobes-quick-and-dirty/index.html
s3_sync Creating 2010/02/08/whats-wrong-with-this-picture/index.html
s3_sync Creating 2010/02/09/aperture-3-and-pdn/index.html
@rwboyer
rwboyer / Gemfile.lock
Created November 2, 2013 10:35
Gemfile.lock
aGEM
remote: http://rubygems.org/
specs:
activemodel (3.2.15)
activesupport (= 3.2.15)
builder (~> 3.0.0)
activesupport (3.2.15)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
asset_sync (1.0.0)
@rwboyer
rwboyer / config.rb
Created November 2, 2013 10:34
config.rb
# def some_helper
# "Helping"
# end
# end
set :js_dir, 'js'
set :css_dir, 'css'
foundation_path = Gem::Specification.find_by_name('zurb-foundation').gem_dir
@rwboyer
rwboyer / Gemfile
Created November 2, 2013 10:33
Gemfile
# If you have OpenSSL installed, we recommend updating
# the following line to use "https"
source 'http://rubygems.org'
gem "middleman", "~>3.1.6"
gem "excon", "0.28.0"
gem "fog", "1.18.0"
gem "middleman-blog"
gem "middleman-sync"
gem "middleman-s3_sync"
@rwboyer
rwboyer / s3_sync.txt
Created November 1, 2013 21:39
s3_sync
s3_sync Creating .htaccess
s3_sync Creating 2008/03/28/lies-damned-lies-and-statistics/index.html
s3_sync Creating 2008/04/14/histograms-and-using-your-head/index.html
s3_sync Creating 2008/04/16/color-management-and-other-stupid-internet-tricks/index.html
s3_sync Creating 2008/04/20/a-quick-review-of-portrait-lighting-terms/index.html
s3_sync Creating 2008/05/05/local-contrast-and-perceived-tonal-values/index.html
s3_sync Creating 2008/07/15/apple-aperture-21-organization/index.html
s3_sync Creating 2008/07/23/some-thoughts-on-white-balance/index.html
s3_sync Creating 2008/07/25/quick-tip-using-a-beauty-dish/index.html
s3_sync Creating 2008/07/28/hdr-versus-plain-old-raw/index.html
@rwboyer
rwboyer / _featured.erb
Created October 31, 2013 19:52
middleman partial
@rwboyer
rwboyer / jekyll-breakage-1302.html
Last active December 19, 2015 18:09
clip from code that now does extremely strange things in Jekyll 1.1.0. It re-wraps what should be just article content through the entire layout chain over again so you end up with a site within a site - or a list of sites within sites... Maybe I am doing something way nuts and just don't see it but worked find up through 1.0.3
<div class="entry-content">{{ content | excerpt }}</div>
{% capture excerpted %}{{ content | has_excerpt }}{% endcapture %}
{% if excerpted == 'true' %}
<footer>
<a rel="full-article" href="{{ root_url }}{{ post.url }}">{{ site.excerpt_link }}</a>
</footer>
{% endif %}
{% else %}
<div class="entry-content">{{ content }}</div>
{% endif %}