Skip to content

Instantly share code, notes, and snippets.

View Chrisedmo's full-sized avatar

Chris Mousdale Chrisedmo

View GitHub Profile
@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
@LeaVerou
LeaVerou / dabblet.css
Created March 23, 2013 23:44
Vertically centered text with SVG
/* Vertically centered text with SVG */
div {
width: 300px;
height: 150px;
background: #f06;
font: bold 150% sans-serif;
text-shadow: 0 1px 2px rgba(0,0,0,.5);
overflow: hidden; resize: both; /* just for this demo */
color: white;
@lukekarrys
lukekarrys / README.md
Last active February 4, 2018 01:05
Instagram Jekyll Plugin for to Embed Photos
@khalwat
khalwat / crontab_helper
Last active April 20, 2018 23:39
Never struggle with editing your crontab again; put this in the beginning of each of your crontabs
This is now part of craft-scripts:
https://github.com/nystudio107/craft-scripts
@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
@tomjn
tomjn / typekit.editor.php
Created September 10, 2012 10:22
Typekit fonts for TinyMCE editor plugin
add_filter("mce_external_plugins", "tomjn_mce_external_plugins");
function tomjn_mce_external_plugins($plugin_array){
$plugin_array['typekit'] = get_template_directory_uri().'/typekit.tinymce.js';
return $plugin_array;
}
if (typeof (AC) === "undefined") {
AC = {}
}
AC.ImageReplacer = Class.create({
_defaultOptions: {
listenToSwapView: true,
filenameRegex: /(.*)(\.[a-z]{3}($|#.*|\?.*))/i,
filenameInsert: "_☃x",
ignoreCheck: /(^http:\/\/movies\.apple\.com\/|\/105\/|\/global\/elements\/quicktime\/|_(([2-9]|[1-9][0-9]+)x|nohires)(\.[a-z]{3})($|#.*|\?.*))/i,
attribute: "data-hires",
@sjelfull
sjelfull / _lazyFocusImager.twig
Created April 6, 2017 12:51 — forked from hendrikeng/_lazyFocusImager.twig
Twig/Craft macro for lazy responsive images/bgimages with Imager and Focuspoint
{#
// lazyLoaded Image/bgImages, optimized with Imager and Focuspoint
---------------------------------------------------------------------------
https://nystudio107.com/blog/creating-optimized-images-in-craft-cms
https://github.com/aelvan/Imager-Craft
https://github.com/smcyr/Craft-FocusPoint
for the bgImage intrinsic ratio classname creation check:
https://github.com/inuitcss/inuitcss/blob/develop/objects/_objects.ratio.scss
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Responsive Design Testing</title>
<style>
body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }
.wrapper { width: 6000px; }
.frame { float: left; }
h2 { margin: 0 0 5px 0; }