Skip to content

Instantly share code, notes, and snippets.

View steckel's full-sized avatar

Curtis Steckel steckel

  • San Francisco, CA
View GitHub Profile
require 'yaml'
class FrontMatter
YAML_REGEX = /\A(---\s*\n.*?\n?)^(---\s*$\n?)/m
attr_accessor :source, :results, :output
def initialize(source)
@source = source
parse
Process: Tweetbot [1027]
Path: /Users/USER/Downloads/Tweetbot.app/Contents/MacOS/Tweetbot
Identifier: com.tapbots.TweetbotMacAdHoc
Version: 0.8.0 (758)
Code Type: X86-64 (Native)
Parent Process: launchd [183]
Date/Time: 2012-09-24 08:52:54.694 -0700
OS Version: Mac OS X 10.7.5 (11G56)
Report Version: 9
#container
div
width: 25%
&.one
background-color: red
&.two
background-color: blue
@steckel
steckel / readability.coffee
Created June 20, 2012 05:56
Readability Proof Of Concept (in CoffeeScript)
dbg = (s) ->
console.log "Readability: " + s if typeof console isnt "undefined"
readability =
version: "0.5.1"
emailSrc: "http://lab.arc90.com/experiments/readability/email.php"
kindleSrc: "http://lab.arc90.com/experiments/readability/kindle.php"
iframeLoads: 0
# The frame hack is to workaround a firefox bug where if you
@steckel
steckel / fs.walk.coffee
Created May 17, 2012 04:28
Additional node.js fs methods: fs.walk(dir,callback) and fs.walkSync(dir)
fs = require("fs")
fs.walk = (dir, done) ->
results = []
fs.readdir dir, (err, list) ->
done(err) if err
pending = list.length
done(null, results) unless pending
@steckel
steckel / bad-output.html
Created May 1, 2012 21:06
Files for testing URL encoding "issue" with Middleman
<a class="{{name}}" href="%7B%7Bpath%7D%7D">{{name}}</a>
@steckel
steckel / some.coffee
Created April 26, 2012 01:04
Quickie
sayHello2 = (name) ->
text = "Hello #{name}"
sayAlert = ->
alert text
sayAlert()
function bash_git_branch
{
git branch 2> /dev/null | grep \* | python -c "print '['+raw_input()[2:]+']'" 2> /dev/null
}
PS1='${debian_chroot:+($debian_chroot)}\W: $(bash_git_branch)\$ '
@steckel
steckel / faux-browser.coffee
Created March 14, 2012 04:59
jQuery.plugin boilerplate spec (for use with Mocha and Should.js)
root = if window? then window else global
root.$ = require("jquery")
root.jQuery = $

Right now, I don't think any of us use Sass/Scss, Less, or Stylus to the point where switching back and forth isn't possible. They're all basically the same until you get into the super power user features which, none of us have embraced quite yet.

#Sass/Scss

We obviously know what Sass and Scss are. I think the css-compatible format is pretty nice option even though, ascetically, I prefer sass.

body
 background-color:red;