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
/* | |
* 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 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
<?php | |
/** | |
* Application Controller | |
* | |
* | |
* @package cake | |
* @subpackage cake.app | |
*/ | |
class AppController extends Controller { |
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 '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 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
# 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 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
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*\"") |
NewerOlder