Skip to content

Instantly share code, notes, and snippets.

View elyseholladay's full-sized avatar

Elyse Holladay elyseholladay

View GitHub Profile
// 1: how could you rewrite the following to make it shorter?
foo ? bar.doSomething(el) : bar.doSomethingElse(el);
// 2: what is the faulty logic in the following code?
var foo = 'hello';
(function() {
var foo = window.foo || 'world';
@ebello
ebello / gist:5170467
Created March 15, 2013 15:02
Dynamic extend-only selectors
@for $i from 0 through 6 {
%row#{$i} {
top: $block-size * $i;
}
}
@each $year in 1997, 1994, 1993, 1991 {
#y#{$year} a {
@extend %row3;
}
@jimram
jimram / button-semantics.scss
Last active December 21, 2015 12:59
button-semantics.scss : Displays alerts for non-semantic button/link elements. Usage: Include this at the end of your manifest file. Important: For dev use only - do not compile with production code. (inspired by: @heydonworks article http://coding.smashingmagazine.com/2013/08/20/semantic-css-with-intelligent-selectors)
//
// House Keeping - Button Semantics
// --------------------------------------------------
// Alert Message Style
// ---------------------
@mixin house-keeping-alert() {
display: block !important;
@garann
garann / gist:6541294
Created September 12, 2013 17:47
how to blog about code and give zero fucks

I’m frustrated right now. I’ve been looking for someone to write about a technology that tons of people have no doubt used and am coming up short. Really, this is my own fault, because I was hoping I’d find someone who wasn’t a white male to address the topic. There’s nothing wrong with a white male addressing the topic, but I’ve been recommending a lot of white males to write about technologies and I was hoping to put my money where my mouth is in terms of my hopes for the diversity of the field in which I work.

I checked a bunch of related repos on GitHub and found that the maintainers were white guys and the committers were white guys and the people filing issues were white guys. So I checked the Following lists of related Twitter accounts and found.. more white guys. The few women I found either didn’t blog or had Tumblrs full of inspirational quotes and cupcake photos and shit. (Which is fine. But not what I happened to be looking for an expert on.)

And so this is how I became frustrated, because I d

@JohnAlbin
JohnAlbin / _init.scss
Last active December 26, 2015 18:09
Handing IE8 and lower with Breakpoint + compass/support
// Initialize the Sass variables and partials used in this project.
// Set the legacy IE support variables. We override the default values set by
// the compass/support partial, but let styles-ie8.scss override these values.
$legacy-support-for-ie6 : false !default;
$legacy-support-for-ie7 : false !default; // Note the use of !default.
$legacy-support-for-ie8 : false !default;
// Partials to be shared with all .scss files.
@jamesmusgrave
jamesmusgrave / _smart-underline.scss
Last active September 24, 2019 17:57
Smart Underline Sass Mixin
@mixin smart-underline($background: #fff, $text: #000, $selection: #ffc, $position: 86%){
a {
color: inherit;
text-decoration: none;
background: -webkit-linear-gradient($background, $background), -webkit-linear-gradient($background, $background), -webkit-linear-gradient($text, $text);
background-size: .05em 1px, .05em 1px, 1px 1px;
background-repeat: no-repeat, no-repeat, repeat-x;
text-shadow: 0.03em 0 $background, -0.03em 0 $background, 0 0.03em $background, 0 -0.03em $background, 0.06em 0 $background, -0.06em 0 $background, 0.09em 0 $background, -0.09em 0 $background, 0.12em 0 $background, -0.12em 0 $background, 0.15em 0 $background, -0.15em 0 $background;
background-position-y: $position,$position, $position;
background-position-x: 0%, 100%, 0%;
@dvessel
dvessel / README.mdown
Last active May 15, 2020 13:18
Sass+Compass, Guard, LiveReload

This will enable Sass+Compass with LiveReload through Guard. (Guard screen cast)

You will also need a browser component to communicate with LiveReload. (browser extension, livereload.js)

If you prefer going through a GUI, that option is available. The following instructions is specific to Mac OS X and it works through the command line.

Note that this is not specific to Rails projects. This can work for any standalone front-end project.

Instructions

// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}
@mirisuzanne
mirisuzanne / tutorial.mkdn
Created August 22, 2011 20:37
A new Susy tutorial

Susy 0.9 Tutorial

See the official Susy site for 1.0 documentation.

For this tutorial I'm assuming you are already comfortable with CSS, Sass (I'll use the SCSS syntax) and Compass. Please get set up with each one of those before attempting to use Susy. Sass and Compass both have their own setup instructions and tutorials that you can use.

There is also reference documentation in the works.

Building a Susy Grid

Visa requirements for UK conferences.

First you'll want to check if you need a visa to enter the UK.

  • Nationals of the EU, Switzerland, and EEA countries will not need a visa, and are free to work and conduct business in the UK.
  • Nationals from some designated countries such as USA may travel for tourist or business purposes under a visa exemption. The link above will detail what documents you need to provide in order to travel under a visa exemption.
  • Other nationals will need a visa.

The rules for allowable business travel under a visa exemption are covered by the same rules as those travelling under a vistor visa. If you will be travelling under a visa-exemption and the conference is covering your costs in any way you should make sure to read the relevant section below.