Skip to content

Instantly share code, notes, and snippets.

@icegulch
icegulch / flags.json
Created May 7, 2014 21:51
Sample Flag JSON for Lagrange PDF
{
"bin1": [
{
"group" : "client_domains",
"domain": "lightinggenie.com",
"bin": 1,
"load_time" : ".10"
},
{
"group" : "competitor_domains",
@icegulch
icegulch / data.json
Created May 7, 2014 21:50
Sample Chart JSON File for Lagrange PDF
[
{
"bin": 1,
"number_of_companies": 354,
"low": 0.0,
"high": 0.7
},
{
"bin": 2,
"number_of_companies": 273,
-
id: page-01
name: "demo.lagrangesystems.com"
alert_type: "warning"
alert_qty: "2"
badges:
-
title: Degraded
level_color: yellow
## CHANGE LANGUAGE DIRECTION ON CONTAINING UL
.product-listing {
list-style: none;
margin: 0;
padding: 0;
direction: rtl;
unicode-bidi: bidi-override;
font-size: 0; /* avoid word-spacing gap b/t LIs */
}
.product-listing > li {
list-style: none;
width: 300px;
margin: 0 0 20px 0;
padding: 0 10px;
display: inline-block;
/* IE7 inline-block hack */
*display: inline;
*zoom: 1;
vertical-align: top;
<ul class="product-listing">
## LOOP ONE
<li class="bakery-shop-collections">
<h2>{{linklists.bakery-shop-collections.title}}</h2>
<ul>
{% for link in linklists.bakery-shop-collections.links %}
<li{% if link.active %} class="active"{% endif %}>
<a href="{{ link.url }}">{{ link.title }}</a>
</li>
{% endfor %}
@icegulch
icegulch / action.rb
Last active December 20, 2015 19:09 — forked from ahoward/action.rb
# it's not critical for understanding
# but here is the associated server-side action
#
def version
@program = load_program!
@version = @program.versions.find(params[:version_id])
if stale?(:last_modified => @version.updated_at, :etag => @version.cache_key)
@icegulch
icegulch / steves_mixins
Created February 14, 2012 21:08
Some SCSS Mixins
// Border-radius accepts all shorthand combos; defaults to 0.5em
@mixin border-radius($radii: 0.5em) {
-webkit-border-radius: $radii;
-moz-border-radius: $radii;
border-radius: $radii;
}
@mixin transition($speed) {
-webkit-transition: $speed ease-in-out all;
#! /usr/bin/env ruby
# this is best practice for writing mixins. the deferred evaluation is more
# powerful that the approach of ClassMethods/InstanceMethods as modules too
#
module Mixin
# put your class level code in here
#
ClassMethods = proc do