Skip to content

Instantly share code, notes, and snippets.

@andysolomon
andysolomon / SassMeister-input-HTML.html
Created March 9, 2014 07:14
Generated by SassMeister.com.
<div class="sub-content">
<nav role="navigation">
<ul class="nav nav--stacked nav--pills">
<li><h3 class="nav__item__title">Activity</h3></li>
<li>
<span class="messages">New Messages</span>
<span class="badge">3</span>
<a>Buying</a>
</li>
<li>
@andysolomon
andysolomon / star-rating-input.scss
Last active August 29, 2015 13:56
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.5)
// ----
$max-stars: 5;
$starRateOne: "http://f.cl.ly/items/363T3J2o211g2n1f3e3L/dealshield_rating_1.png";
$starRateTwo: "http://f.cl.ly/items/101n0J3Q0L0m0c1x103u/dealshield_rating_2.png";
$starRateThree: "http://f.cl.ly/items/193E3o260c3x3P0t1B2J/dealshield_rating_3.png";
$starRateFour: "http://f.cl.ly/items/0O440Q0O3g1l1x3W2h3H/dealshield_rating_4.png";
$starRateFive: "http://f.cl.ly/items/1t222t222Z0D3G2i1Q40/dealshield_rating_5.png";
@andysolomon
andysolomon / SassMeister-input.scss
Created February 12, 2014 16:47
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
/*
A slightly more automated approach to BEM modifier classes:
using '&' parent selector interpolation, modifiers extend their bases,
so that HTML markup requires only the modifier class not the base *and* modifier
*/

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@andysolomon
andysolomon / _rem.scss
Created February 2, 2014 21:08
_rem.scss
/* --------------------------------------------------------------- *
* A REM-PX Sass mixin
* --------------------------------------------------------------- *
* CodePen: http://codepen.io/HugoGiraudel/pen/xsKdH
* Article: http://hugogiraudel.com/2013/03/18/ultimate-rem-mixin/
* --------------------------------------------------------------- */
/**
* A REM-PX Sass mixin
* ---------------------------------------------------------------
// Boring
if (isThisAwesome) {
alert('yes'); // it's not
}
// Awesome
isThisAwesome && alert('yes');
// Also cool for guarding your code
var aCoolFunction = undefined;
@andysolomon
andysolomon / jsClassicalInheritance.js
Created November 28, 2013 16:45
Classical Inheritance with javascript
// Classical Javascript Inheritance
// Parent class constructor
function Answer(value){
this._val = value;
}
// Parent class method
Answer.prototype.get = function fn1() {
return this._val;
// Inheritance in Javascript
var AnswerPrototype = {
constructor: function fn0(value){
this._val = value;
},
get: function fn1(){
return this._val;
}
};
#!/usr/bin/env bash
# fresh-chrome
#
# Use this script on OS X to launch a new instance of Google Chrome
# with its own empty cache, cookies, and user configuration.
#
# The first time you run this script, it will launch a new Google
# Chrome instance with a permanent user-data directory, which you can
# customize below. Perform any initial setup you want to keep on every
run "sed --in-place '/turbolinks/d' Gemfile"
run "sed --in-place '/turbolinks/d' app/assets/javascripts/application.js"
run "sed --in-place '/coffee/d' Gemfile"
run "sed --in-place '/jbuilder/d' Gemfile"
run "sed --in-place 's/, \"data-turbolinks-track\" => true//' app/views/layouts/application.html.erb"
gem 'active_model_serializers'