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 | |
// TWEED: Twitter feed parser | |
function Tweed ($user, $limit = NULL) { | |
$tweedURL = 'http://search.twitter.com/search.atom?q=from:' . $user; // Twitter RSS feed URL | |
$tweedXML = simplexml_load_file($tweedURL); // Convert RSS to XML | |
$count = 0; // Set count | |
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
#!/usr/bin/env ruby | |
message_file = ARGV[0] | |
message = File.read(message_file) | |
def range_rand(min,max) | |
min + rand(max-min) | |
end | |
bads = [ | |
"Yeah, bitch! Magnets!", |
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
// Lazy font-face generator | |
// @TODO: Consider additional mixin parameter to specify which font filetypes to output, e.g. "eot, woff" | |
@mixin font-face($label,$font) { | |
@font-face { | |
font-family: $label; | |
src: url('#{$font_path}#{$font}.eot'); | |
src: url('#{$font_path}#{$font}.eot?#iefix') format('embedded-opentype'), | |
url('#{$font_path}#{$font}.woff') format('woff'), | |
url('#{$font_path}#{$font}.ttf') format('truetype'), | |
url('#{$font_path}#{$font}##{$label}') format('svg'); |
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
/* | |
FRACTION GRID | |
Fixed gutter, fluid width grid - infinite columns, nesting, overrides, etc. | |
Inspired by http://builtbyboon.com/blog/proportional-grids | |
*/ | |
// @OPTIMISE: larger/smaller + fluid gutters... | |
$w-gutter: 20px !default; | |
$w-max: 1000px !default; |
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
{% for block in section.blocks %} | |
<!-- Could also work with collections, blogs, articles... --> | |
{% if product.handle == block.settings.product %} | |
<!-- Could also be a snippet include --> | |
{{ block.settings.product['some_value'] }} | |
{% endif %} | |
{% endfor %} |
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
{% comment %} | |
image2.liquid | |
PURPOSE | |
- Output images in a consistent manner, with optional Shopify filters and srcset responsiveness | |
- Can be used on both Shopify image objects AND raw image URLs | |
SETUP | |
- Place .liquid file in your project snippet folder and call it from anywhere: | |
{% include 'image' img: product.featured_image %} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>My Portfolio</title> | |
<link href="assets/css/main.css" rel="stylesheet" /> | |
</head> | |
<body> |
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
{% comment %}Workaround for dynamic sections outside of homepage{% endcomment %} | |
{% for block in section.blocks %} | |
{% if product.handle == block.settings.product %} | |
{% | |
include 'hero' | |
hero_title: block.settings.title | |
%} | |
{% endif %} |
OlderNewer