Skip to content

Instantly share code, notes, and snippets.

View jmuheim's full-sized avatar

Josua Muheim jmuheim

View GitHub Profile
@jmuheim
jmuheim / gist:3436567
Created August 23, 2012 13:25
Tables with white-space:nowrap, overflow:hidden, text-overflow:ellipsis that do not need table-layout:fixed
<html>
<head>
<style type="text/css" media="screen">
table {
width: 100%;
table-layout: fixed;
border-collapse: collapse;
}
table th, table td {
@jmuheim
jmuheim / gist:3721506
Created September 14, 2012 11:52
Rails signatures ...
# Creates a Twitter Bootstrap nav item.
#
# @see http://twitter.github.com/bootstrap/components.html#navs
#
# @param [String optional] caption The caption of the item, optional if a block is passed
# @param [String optional] url The URL of the item
# @param [Hash] options
# @option options [Boolean] :brand (false) Set to true to define this item as the brand (this should be called directly on the `navbar` element itself as it also omits the surrounding `li` element)
# @option options [Boolean] :icon (nil) Pass the name of an icon (without the prefix `icon-`) to have an icon displayed to the left of the caption; see [available icons](http://twitter.github.com/bootstrap/base-css.html#icons)
# @return [String] HTML code
/ ...
- f.inputs do
= f.hidden_field :lock_version
/ ...