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
def zip(theme, location) | |
begin | |
FileUtils.mkdir_p(File.dirname(location)) | |
FileUtils.rm(location) if File.exists?(location) | |
if RUBY_PLATFORM =~ /darwin/ | |
Dir.chdir(THEMES) do | |
system("zip -r \"#{location}\" #{theme}/ -x \"*.svn*\" -x \"*.git*\"") |
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
# put this in 'serve_file' | |
if File.exists?("#{template_path}/#{filename}.liquid") | |
filepath = "#{template_path}/#{filename}.liquid" | |
else | |
filepath = "#{template_path}/#{filename}" | |
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
require 'rubygems' | |
require 'mechanize' | |
BASE = 'http://manure.myshopify.com/admin' | |
LOGIN = '/auth/login' | |
USER = '[email protected]' | |
PWD = 'moo-moo' | |
agent = Mechanize.new | |
page = agent.get(BASE+LOGIN) | |
form = page.forms.first | |
form.login = USER |
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
<div class="article"> | |
<h2 class="article-title">{{ article.title }}</h2> | |
<p class="article-details">posted <span class="article-time">{{ article.published_at | date: "%Y %h" }}</span> by <span class="article-author">{{ article.author }}</span></p> | |
<div class="article-body textile"> | |
{{ article.content }} | |
{% if article.title == 'Our New merchandise' %} | |
<ul> | |
{% for product in collections.new-merchandise.products limit:3 %} | |
<li> | |
<div class="feature-product"> |
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
<?php | |
/** | |
* Application Controller | |
* | |
* | |
* @package cake | |
* @subpackage cake.app | |
*/ | |
class AppController extends Controller { |
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
/* | |
* mediaquery function - test whether a CSS media type or query applies | |
* author: Scott Jehl | |
* Copyright (c) 2010 Filament Group, Inc | |
* MIT license | |
* Developed as a feature of the EnhanceJS Framework (enhancejs.googlecode.com) | |
* thx to: | |
- phpied.com/dynamic-script-and-style-elements-in-ie for inner css text trick | |
- @paul_irish for fakeBody trick | |
*/ |
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
/* | |
* mediaquery function - test whether a CSS media type or query applies | |
* author: Scott Jehl | |
* Copyright (c) 2010 Filament Group, Inc | |
* MIT license | |
* Developed as a feature of the EnhanceJS Framework (enhancejs.googlecode.com) | |
* thx to: | |
- phpied.com/dynamic-script-and-style-elements-in-ie for inner css text trick | |
- @paul_irish for fakeBody trick | |
*/ |
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
{% if template == 'product' %} | |
{% assign mf = product.metafields.meta_description %} | |
{% unless mf == empty %} | |
{% for mf in product.metafields.meta_description %} | |
<meta name="Fubar2 Ronnie James Dio" content="{{mf.last}}" /> | |
{% endfor %} | |
{% endunless %} | |
{% endif %} |
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
// --------------------------------------------------------- | |
// POST to cart/update.js returns the cart in JSON. | |
// To clear a particular attribute, set its value to an empty string. | |
// Receives attributes as a hash or array. Look at comments below. | |
// --------------------------------------------------------- | |
Shopify.updateCartAttributes = function(attributes, callback) { | |
var data = ''; | |
// If attributes is an array of the form: | |
// [ { key: 'my key', value: 'my value' }, ... ] | |
if (jQuery.isArray(attributes)) { |
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
/* | |
* Superfish v1.4.8 - jQuery menu widget | |
* Copyright (c) 2008 Joel Birch | |
* | |
* Dual licensed under the MIT and GPL licenses: | |
* http://www.opensource.org/licenses/mit-license.php | |
* http://www.gnu.org/licenses/gpl.html | |
* | |
* CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt | |
*/ |
OlderNewer