Skip to content

Instantly share code, notes, and snippets.

View samleb's full-sized avatar
:octocat:
CTO at Primo

Samuel Lebeau samleb

:octocat:
CTO at Primo
View GitHub Profile
@guyboltonking
guyboltonking / compressed_static_assets.rb
Created March 21, 2012 20:37
Slightly hacky rails middleware for serving up precompiled gzipped assets
require 'action_dispatch/middleware/static'
module Middleware
class FileHandler < ActionDispatch::FileHandler
def initialize(root, assets_path, cache_control)
@assets_path = assets_path.chomp('/') + '/'
super(root, cache_control)
end
def match?(path)
@atk
atk / LICENSE.txt
Created June 29, 2011 13:46 — forked from 140bytes/LICENSE.txt
Date.parse polyfill (no timezone support)
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alex Kloss <alexthkloss@web.de>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE