Skip to content

Instantly share code, notes, and snippets.

View jedfoster's full-sized avatar

Jed Foster jedfoster

View GitHub Profile
@jedfoster
jedfoster / SassMeister-input-HTML.jade
Last active March 9, 2016 20:15
Generated by SassMeister.com.
p.intro Intro text
p Not intro text
blockquote
p Blockquote text
hr
a
@jedfoster
jedfoster / rasterize.js
Created August 29, 2015 19:21
Improved PhantomJS rasterize script
// Takes a screenshot of a URL or HTML string. Optionally, set viewport size
// and resolution, or capture only a specific element
//
// Usage: `phantomjs rasterize.js URL|[or URI encoded HTML string] output size scale element`
//
// Examples:
// `phantomjs rasterize.js http://google.com google.png`
// `phantomjs rasterize.js http://google.com img/google-logo.png auto 1 \#hplogo`
// `phantomjs rasterize.js %3Chtml%3E%3Cbody%3E%3Ch1%3EHello%20world!%3C%2Fh1%3E%3C%2Fbody%3E%3C%2Fhtml%3E hello-world.png
//
@jedfoster
jedfoster / SassMeister-input-HTML.jade
Last active August 29, 2015 14:22
Generated by SassMeister.com.
.block
- var n = 0
while n < 25
.element= n++
@jedfoster
jedfoster / SassMeister-input-HTML.jade
Last active August 29, 2015 14:18
Generated by SassMeister.com.
- var filters = { city: { title: 'City', values: {sea: 'Seattle', chi: 'Chicago', pdx: 'Portland' } }, stack: { title: 'Stacks', values: { js: 'JavaScript', ruby: 'Ruby on Rails', python: 'Python', ios: 'iOS Development', ux: 'Web UI Development' } }, experience: { title: 'Experience Level', values: { exp1: 'Beginner', exp2: 'Intermediate', exp3: 'Advanced' } }, quarter: { title: 'Start Date', values: { q1: 'Winter', q2: 'Spring', q3: 'Summer', q4: 'Fall' } }, format: { title: 'Format', values: {full: 'Full Time', part: 'Part Time' } } };
#filters
h1 Filter By
section
each data, filter in filters
h2= data.title
@jedfoster
jedfoster / SassMeister-input-HTML.haml
Last active August 29, 2015 14:18
Generated by SassMeister.com.
- filters = {
- city: { title: 'City',
values: {
- sea: 'Seattle',
chi: 'Chicago',
pdx: 'Portland' }
- },
stack: { title: 'Stacks',
values: {
- js: 'JavaScript',
@jedfoster
jedfoster / SassMeister-input.scss
Last active August 29, 2015 14:18
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
// In response to https://twitter.com/jed_foster/status/582955571428483072
// Notice how this doesn't suck.
// Align an object with absolute positioning
@jedfoster
jedfoster / sass-style-guide.md
Last active July 8, 2016 19:59
Coding Style Guide for Sass

Coding style

(Largely cribbed from GitHub's Styleguide)

Spacing

  • Use soft-tabs with a two space indent. Spaces are the only way to guarantee code renders the same in any person's environment.
  • Put spaces after : in property declarations.
  • Put line breaks between rulesets.
  • When grouping selectors, keep individual selectors to a single line.
@jedfoster
jedfoster / SassMeister-input-HTML.jade
Last active August 29, 2015 14:15
Generated by SassMeister.com.
section
.one-half
.one-half
section
.two-thirds
.one-third
section
.three-quarters
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v2.0.0.js"></script>
<script src="http://builds.emberjs.com/tags/v1.9.0/ember.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<style id="jsbin-css">
svg a {
-webkit-transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, text-shadow 0.25s ease, fill 0.25s ease;
-moz-transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, text-shadow 0.25s ease, fill 0.25s ease;
-o-transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, text-shadow 0.25s ease, fill 0.25s ease;
transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, text-shadow 0.25s ease, fill 0.25s ease;
}
svg {
fill: dimgray;