Skip to content

Instantly share code, notes, and snippets.

View DanielWright's full-sized avatar

Daniel Wright DanielWright

View GitHub Profile
@DanielWright
DanielWright / README.md
Created November 16, 2011 18:51
Simple font-smoothing in Internet Explorer

The filter and zoom rules in the sample stylesheet above will apply a smoothing/blurring effect to text elements. In the sample stylesheet, these rules are applied to all headers, paragraphs, list items, and table cells, but in practice, you will want to tailor the application of the smoothing effect to only those elements rendering with significant aliasing.

Nota Bene: the filter appears to place an overflow: hidden-style block around the elements being smoothed, so do not apply these rules directly to elements that need to scroll, or which contain absolutely positioned elements that appear outside the boundaries of the element itself.

@DanielWright
DanielWright / mixins.sass
Created August 27, 2012 17:27
Alternative to Compass's in-built +clearfix mixin
@mixin alternate-clearfix
overflow: visible
*zoom: 1
&::before, &::after
content: ''
display: table
&::after
clear: both
@DanielWright
DanielWright / mixins.sass
Created January 22, 2013 20:34
fancy-horizontal-rule Sass mixin
@mixin fancy-horizontal-rule($background)
@include reset-box-model
@include background(image-url($background) center center no-repeat)
border-width: 0 0 0 0
margin: 10px 0
height: image-height($background)
width: 100%
*display: list-item
*filter: alpha(opacity=0)
@DanielWright
DanielWright / variant_helper.rb
Last active December 11, 2015 17:48
Localized buy-online link localization
require 'dynamo/country'
require 'aldo/online_store_locale'
module VariantsHelper
def where_to_buy(variant)
content_tag(:ul) do
list_items = []
if tag = buy_online_tag(variant)
list_items << content_tag(:li, tag, :class => t(:'.buy_online').parameterize)
list_items << content_tag(:li) { link_to t(:'.find_a_store'), locations_path }
@DanielWright
DanielWright / prompt_dwright_setup
Created April 6, 2013 21:42
My custom YADR prompt
#
# A theme based on steeef theme
# * RVM/Rbenv info shown on the right
# * Git branch info on the left
# * Single line prompt
#
# Authors:
# Steve Losh <steve@stevelosh.com>
# Bart Trojanowski <bart@jukie.net>
# Brian Carper <brian@carper.ca>
@DanielWright
DanielWright / 0_README.md
Last active December 17, 2015 21:59 — forked from svarks/0_README.md

ruby-1.9.3-p429 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p429 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@DanielWright
DanielWright / backtrace
Created June 26, 2013 16:24
ActiveAdmin::Resource#default_options backtrace
~/Code/dynamo/aldo/zelda (master●●)$ RAILS_ENV=staging bake assets:precompile
rake aborted!
FATAL: database "aldo-zelda_staging" does not exist
/Users/dwright/Code/dynamo/aldo/zelda/.bundle/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:825:in `initialize'
/Users/dwright/Code/dynamo/aldo/zelda/.bundle/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:825:in `new'
/Users/dwright/Code/dynamo/aldo/zelda/.bundle/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:825:in `connect'
/Users/dwright/Code/dynamo/aldo/zelda/.bundle/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:542:in `initialize'
/Users/dwright/Code/dynamo/aldo/zelda/.bundle/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `new'
/Users/dwright/Code/dynamo/aldo/zelda/.bundle/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `postgresql
@DanielWright
DanielWright / application.rb
Created July 25, 2013 17:54
Rails4/ActiveAdmin/Heroku precompilation workaround
# config/application.rb
# ...
module MyApp
class Application < Rails::Application
# ...
config.before_initialize do

Login:

Google Cloud Storage

You'll want to login using an official Google account (i.e. if this is for your company, use the comapany Gmail account vs. a personal one.)

When logging in, you might be prompted to verify the account; if so, enter your cell number to get a verification e-mail or phone call.

Once verified, you'll have to agree to the terms of service; do that, and click continue.

bay_area:
- farmers:
slug: farmers-markets
title: Farmers Markets
address: Various locations
- kiosk:
slug: kiosk
title: Kiosk
address: "315 Linden St.<br/>San Francisco, CA 94102"