Models | Examples |
---|---|
Display ads | Yahoo! |
Search ads |
# Brunch - http://brunch.io/ | |
# | |
# Using uglify-js-brunch - https://github.com/brunch/uglify-js-brunch | |
# | |
# Use the following settings in your Brunch configuration file | |
exports.config = | |
plugins: | |
uglify: | |
output: |
// Copyright (c) 2012 Sutoiku, Inc. (MIT License) | |
// Some algorithms have been ported from Apache OpenOffice: | |
/************************************************************** | |
* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file |
require 'redis' | |
# the heart of the message bus, it acts as 2 things | |
# | |
# 1. A channel multiplexer | |
# 2. Backlog storage per-multiplexed channel. | |
# | |
# ids are all sequencially increasing numbers starting at 0 | |
# | |
class MessageBus::Message < Struct.new(:global_id, :message_id, :channel , :data) |
- Run an insert statement to YQL, storing your API Key with a use statement linking to this gist.
insert into yql.storage.admin (value) values ("
use 'https://raw.github.com/gist/5ceb77a28686513f16a7/cb17fcb095847f320426fb0fc5261d47cf62b0d8/postmark.xml' as postmark;
set api_key='YOUR KEY HERE' on postmark;
")
Don't go to Fishermans Wharf. Drive out to Santa Cruz, Muir Woods, Point Reyes, Napa and Sonoma. | |
If you want to spend 500USD on a meal then get a ticket to Saison Chef's Counter. Highly recommended. | |
Walk around Embarcadero. Check out Golden Gate Park. Do you like to ride bicycles? | |
Head to Umi and Tataki South for sushi. Head to Chez Maman and Papito. Piccino. Plow for brunch, be sure to have the potatoes. | |
Don't do brunch on the weekend though. You'll always have to wait. Weekdays are best. |
By default the Rails 3 asset pipeline uses the Uglifier gem to optimize and minify your Javascript. One of its many optimisations is to remove all whitespace, turning your Javascript into one very long line of code.
Whist removing all the newlines helps to reduce the file size, it has the disadvantage of making your Javascript harder to debug. If you've tried to track down Javascript errors in minified Javascript files you'll know the lack of whitespace does make life harder.
Luckily there is a simple solution: to configure Uglifier to add newlines back into the code after it performs its optimisations. And if you're serving your files correctly gzip'd, the newlines add only a small increase to the final file size.
You can configure Uglifier to add the newlines by setting the following in your Rails 3 config/production.rb
file:
class ChangeValidator < ActiveModel::EachValidator | |
# Enforce/prevent attribute change | |
# | |
# Example: Make attribute immutable once saved | |
# validates :attribute, change: false, on: :update | |
# | |
# Example: Force attribute change on every save | |
# validates :attribute, change: true | |
def initialize(options) |
/** | |
* @license Angular Auth | |
* (c) 2012 Witold Szczerba | |
* License: MIT | |
*/ | |
angular.module('angular-auth', []) | |
/** | |
* Holds all the requests which failed due to 401 response, | |
* so they can be re-requested in the future, once login is completed. |
http://www.frischeparadies.eu/?view=featured | |
http://www.markthalle9.de/ | |
http://www.meine-markthalle.de/ | |
http://www.exberliner.com/articles/the-ethical-carnivore/ | |
http://www.fleischerei-gerlach.de/index.html | |
http://www.neuland-kluge.de/ | |
http://www.fleischerei-buenger.de/ |