Skip to content

Instantly share code, notes, and snippets.

View jedfoster's full-sized avatar

Jed Foster jedfoster

View GitHub Profile

GitHub Flavored Markdown

View the source of this content.

Let's get the whole "linebreak" thing out of the way. The next paragraph contains two phrases separated by a single newline character:

Roses are red Violets are blue

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one

@jedfoster
jedfoster / Markdown test.md
Last active November 12, 2020 02:28
Markdown test <b>BOLD</b>

H1: Roughdraft is GitHub Gists, made pretty. #7a7a7a

H2: Roughdraft is GitHub Gists, made pretty. #7a7a7a

H3: Roughdraft is GitHub Gists, made pretty. #7a7a7a

H4: Roughdraft is GitHub Gists, made pretty. #646464

H5: Roughdraft is GitHub Gists, made pretty. #4d4d4d
H6: Roughdraft is GitHub Gists, made pretty. #212121

Alternatively, for H1 and H2, an underline-ish style:

Alt-H1

@jedfoster
jedfoster / index.html
Created April 2, 2013 19:00
A CodePen by Jed Foster. CSS toggle (full width slide) - Mimic the ON/OFF toggle control from iOS. This version keeps each state (ON/OFF) at their full width, and slides them left and right. This allows you have a different color background for each state, very closely imitating the behavior of the iOS toggle control. However, there seems to be …
<div class="toggle">
<label class="toggle-radio" for="toggleOption2">ON</label>
<input type="radio" name="toggleOptions" id="toggleOption1" value="option1" checked="checked">
<span class="knob"> </span>
<label class="toggle-radio" for="toggleOption1">OFF</label>
<input type="radio" name="toggleOptions" id="toggleOption2" value="option2">
</div>
@jedfoster
jedfoster / SassMeister-input.scss
Last active December 15, 2015 19:29
Embed other Gist files in your Draft
// ---
// Breakpoint Slicer (v1.1)
// Singularity (v1.0.7)
// Sass (v3.2.7)
// ---
$slicer-breakpoints: 0 400px 600px 800px 1050px;
.element {
@jedfoster
jedfoster / SassMeister-input.scss
Last active December 17, 2015 04:19
Generated by SassMeister.com, the Sass playground.
// Sassy Text Shadows (v0.0.4)
body {
text-align: center;
}
h1 {
@include text-shadow(sassy-text-shadow(#BADA55));
line-height: 8em;
}
@jedfoster
jedfoster / gist:5600447
Last active December 17, 2015 11:09
Step-by-step process for adding Toadstool to a project

Javascripts

  1. mv ../toadstool-rails/app/assets/javascripts/toadstool-nav.js app/assets/javascripts/
  2. mv ../toadstool-rails/app/assets/javascripts/toadstool.js.coffee app/assets/javascripts/

Sass style guide

  1. mv ../toadstool-rails/app/assets/stylesheets/ app/assets/

Admin controller

@jedfoster
jedfoster / file.md
Last active December 19, 2015 04:29
Roughdraft action tree
home
  |---> Yes ---> Show only RSS
  |
  |---> No
        |
        |---> Logged in
        

Home / Not home
@jedfoster
jedfoster / Test.litcoffee
Created July 13, 2013 02:42
Literate Coffeescript

The Scope class regulates lexical scoping within CoffeeScript. As you generate code, you create a tree of scopes in the same shape as the nested function bodies. Each scope knows about the variables declared within it, and has a reference to its parent enclosing scope. In this way, we know which variables are new and need to be declared with var, and which are shared with external scopes.

Import the helpers we plan to use.

{extend, last} = require './helpers'
@jedfoster
jedfoster / Test.textile
Last active December 19, 2015 17:09
Plain Text

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

akdsf;lsadkjflds

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et do