Skip to content

Instantly share code, notes, and snippets.

View brendanfalkowski's full-sized avatar
🏍️
💨💨💨💨💨💨

Brendan Falkowski brendanfalkowski

🏍️
💨💨💨💨💨💨
View GitHub Profile
@fbrnc
fbrnc / gist:1705041
Created January 30, 2012 15:44
Magento switch to one column
<!-- do this: -->
<catalog_category_default>
<update handle="page_one_column" />
</catalog_category_default>
<!-- Also possible, but won't apply other settings that might be attached to the 1column layout (so don't do that...): -->
@elliotjaystocks
elliotjaystocks / Art direction in Harmony
Created May 3, 2012 14:33
Art direct your blog posts in Harmony by inserting this loop into the <head> and injecting any extra CSS or JSS you might need by creating a field in your post template called 'injected_code'.
{% if item.root? %}
{{ 'blog' | item_from_path | assign_to: 'blog' }}
{% for post in blog.recent_posts.1 %}
<!-- Injected code from the latest blog post -->
{{ post.data.injected_code }}
{% endfor %}
@kalenjordan
kalenjordan / mass-copyright-replace.sh
Last active December 24, 2015 07:49
Change copyright from 2013 to 2012
@hdragomir
hdragomir / sm-annotated.html
Last active October 9, 2024 00:35
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@tkadlec
tkadlec / perf.js
Created April 23, 2015 11:54
Super simple example of adding perf timing to the page display during dev work
(function () {
var perfBar = function(budget) {
window.onload = function() {
window.performance = window.performance || window.mozPerformance || window.msPerformance || window.webkitPerformance || {};
var timing = window.performance.timing,
now = new Date().getTime(),
output, loadTime;