Skip to content

Instantly share code, notes, and snippets.

View Chrisedmo's full-sized avatar

Chris Mousdale Chrisedmo

View GitHub Profile
@stammy
stammy / Rakefile
Created January 22, 2011 10:28
dirty hack of a rakefile I use to upload new images to cloudfront for jekyll blog posts
# when I write new blog posts I usually have a temporary folder called new_post on my desktop
# that I place images I want to upload to amazon s3 (which is distributed as CF) and then
# get the appropriate URLs to put the images in my blog post
# I usually save files as some_slug.png and some_slug_1200.png
# with the latter being a larger version (1200px wide) of the first.
# a typical upload will include 20 files. 2 versions of some (sm and lg), and some orphans
# so this compares filenames and if it detects a larger version of a file,
# it links the the smaller image to the larger image (i use fancyzoom on my site)
# if not, it just links to the image
@tedkulp
tedkulp / receive-email.rb
Created May 13, 2011 01:31
Email to Jekyll script
#!/usr/bin/env ruby
# -*- coding: utf-8 -*- #specify UTF-8 (unicode) characters
#Email to Jekyll script
#(c)2011 Ted Kulp <ted@tedkulp.com>
#MIT license -- Have fun
#Most definitely a work in progress
#Mail is an awesome gem. Install it.
require 'rubygems'
@alexeckermann
alexeckermann / category_list_block.rb
Created June 27, 2011 11:46
The Jekyll plugins used on alexeckermann.com
module Jekyll
class CategoryListBlock < Liquid::Block
include Liquid::StandardFilters
def render(context)
categories = context.registers[:site].categories.keys
result = []
context.stack do
@javan
javan / gist:1168475
Created August 24, 2011 16:32
Fix iPhone home button
Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/
1.) Open any application
2.) Press and hold the power button until the slide to shutdown swipe bar appears.
3.) Release Power button
4.) Press and hold Home button Lightly
until screen returns to icon screen
@davecap
davecap / collections.liquid.html
Last active March 19, 2024 13:08
"Infinite" scrolling in Shopify collections
{% paginate collection.products by 20 %}
<!-- the top of your collections.liquid -->
<!-- START PRODUCTS -->
{% for product in collection.products %}
<!-- START PRODUCT {{ forloop.index | plus:paginate.current_offset }} -->
<div class="product" id="product-{{ forloop.index | plus:paginate.current_offset }}">
{% include 'product' with product %}
</div>
<!-- END PRODUCT {{ forloop.index | plus:paginate.current_offset }} -->
@tjogin
tjogin / README.md
Created September 5, 2011 06:56 — forked from rodrigorm/README.md
Configuration file to use PHP with Ruby rack

Installation

First you need php-cgi, i used brew with Formula below:

$ curl -O https://raw.github.com/gist/1194269/7ae1709453a8a19ce9c030bf41d544dd08d96d85/php.rb
$ mv php.rb `brew --prefix`/Library/Formula
$ brew install php --with-mysql

Second, install this ruby gems:

@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@LeaVerou
LeaVerou / vunits.js
Created November 8, 2011 11:05
Static polyfill for vw, vh, vm units
/**
* Polyfill for the vw, vh, vm units
* Requires StyleFix from -prefix-free http://leaverou.github.com/prefixfree/
* @author Lea Verou
*/
(function() {
if(!window.StyleFix) {
return;
@lukekarrys
lukekarrys / README.md
Last active February 4, 2018 01:05
Instagram Jekyll Plugin for to Embed Photos
@scottkellum
scottkellum / normalized.html
Created December 6, 2011 14:58
pixel normalization
<!doctype html>
<html>
<head>
<!-- Encoding -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"></meta>