Skip to content

Instantly share code, notes, and snippets.

View resistorsoftware's full-sized avatar

David Lazar resistorsoftware

View GitHub Profile
@resistorsoftware
resistorsoftware / gist:3927334
Created October 21, 2012 15:54
OpenSSL problems with Shopify
openssl s_client -CApath /etc/ssl/certs -showcerts -connect luxutest.myshopify.com:443
CONNECTED(00000003)
depth=0 /serialNumber=inVwoUGzj3duFEUBdzDQrbS2kO1qx0Vr/C=CA/ST=Ontario/L=Ottawa/O=Jaded Pixel Technologies Inc./CN=*.myshopify.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 /serialNumber=inVwoUGzj3duFEUBdzDQrbS2kO1qx0Vr/C=CA/ST=Ontario/L=Ottawa/O=Jaded Pixel Technologies Inc./CN=*.myshopify.com
verify error:num=27:certificate not trusted
verify return:1
depth=0 /serialNumber=inVwoUGzj3duFEUBdzDQrbS2kO1qx0Vr/C=CA/ST=Ontario/L=Ottawa/O=Jaded Pixel Technologies Inc./CN=*.myshopify.com
verify error:num=21:unable to verify the first certificate
☠$ brew install postgresql
==> Downloading http://ftp.postgresql.org/pub/source/v9.1.4/postgresql-9.1.4.tar.bz2
Already downloaded: /Users/fizzbuzz/Library/Caches/Homebrew/postgresql-9.1.4.tar.bz2
==> Patching
patching file src/pl/plpython/Makefile
patching file contrib/uuid-ossp/uuid-ossp.c
==> ./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.1.4 --datadir=/usr/local/Cellar/postgresql/9.1.4/share/postgresql --docdir=/usr/local/Cellar/postgresql/9.1.4/share/doc/postgresql --enable-
checking build system type... x86_64-apple-darwin10.8.0
checking host system type... x86_64-apple-darwin10.8.0
checking which template to use... darwin
@resistorsoftware
resistorsoftware / gist:3005000
Created June 27, 2012 15:54
list-collection
{% if template contains 'list-collections' %}
<meta name="description" content="Product collections from {{ shop.name }} - page {{ current_page}}." />
{% endif %}
@resistorsoftware
resistorsoftware / gist:2836867
Created May 30, 2012 15:02
SEO Manager Liquid
{% comment %} SEO Meta Manager - v1.0 {% endcomment %}
{% assign maxmeta = 155 %}
{% assign metaControl = false %}
{% if template contains 'product' %}
{% assign metaControl = true %}
{% assign metaArray = product.metafields.SEOMetaManager %}
{% assign defaultTitle = product.title %}
{% assign defaultDescription = product.description %}
{% elsif template contains 'page' %}
{% assign metaControl = true %}
@resistorsoftware
resistorsoftware / blog.liquid
Created May 11, 2012 16:47
Meta Tagger Blog SEO
{% if template contains 'blog' %}
{% assign mf = blog.metafields.meta_data %}
{% unless mf == empty %}
{% for mf in blog.metafields.meta_data %}
{% capture key %}{{ mf | first }}{% endcapture %}
{% if key == 'title' %}
<title>{{mf | last}}</title>
<meta name="title" content="{{mf | last}}" />
{% endif %}
{% if key == 'meta_description' %}
@resistorsoftware
resistorsoftware / commented liquid
Created May 9, 2012 03:45
Meta Tagger Liquid with some comments
{% comment %} this is useful as Shopify ensures canonical just works {% endcomment %}
<link rel="canonical" href="{{ canonical_url }}" />
{% comment %} this is simple a limit for when we blindly dump Shopify data for SEO, the old hail mary pass {% endcomment %}
{% assign maxmeta = 155 %}
{% comment %} PRODUCT SEO!!! {% endcomment %}
{% if template contains 'product' %}
{% comment %} Okay, does this Product have any meta_data from the App {% endcomment %}
@resistorsoftware
resistorsoftware / gist:2586825
Created May 3, 2012 16:05
Playing with blog article
b = ShopifyAPI::Blog.first
a = ShopifyAPI::Article.create(:title => "FizzBuzz", :author => "Gringo", :tags => "tag1, tag2", :body_html => "<h1>Article on Monkeys</h1>", :published_at => "2011-01-01 00:15")
a.published_at => "2011-01-01T00:15:00-05:00"
a.published_at = "2011-02-02" => "2011-02-02"
a.save => true
a.published_at = "2011-02-02" => "2011-02-02"
@resistorsoftware
resistorsoftware / aa_instructions.md
Created May 2, 2012 04:14 — forked from NZKoz/aa_instructions.md
Back Up All Your Gmail
  • Install getmail (aptitude install getmail4)
  • Set Up Your Imap Server (tl;dr)
  • getmail
  • ruby date_based_archive.rb ~/Maildir/.Archive
@resistorsoftware
resistorsoftware / Responsive
Created April 25, 2012 13:36
Meta Tagger for Responsive
<link rel="canonical" href="{{ canonical_url }}" />
{% assign maxmeta = 155 %}
{% if template contains 'product' %}
{% if collection %}
<link rel="canonical" href="{{ shop.url }}{{ product.url }}" />
{% endif %}
{% assign mf = product.metafields.meta_data %}
{% unless mf == empty %}
{% for mf in product.metafields.meta_data %}
{% capture key %}{{ mf | first }}{% endcapture %}
@resistorsoftware
resistorsoftware / Fixed up and modernized Expo gist
Created April 4, 2012 14:46
Meta Tagger Snippet for Expo Theme
<link rel="canonical" href="{{ canonical_url }}" />
{% assign maxmeta = 155 %}
{% if template contains 'product' %}
{% assign mf = product.metafields.meta_data %}
{% unless mf == empty %}
{% for mf in product.metafields.meta_data' %}
{% capture key %}{{ mf | first }}{% endcapture %}
{% if key == 'title' %}
<title>{{mf | last}}</title>
<meta name="title" content="{{mf | last}}" />