Skip to content

Instantly share code, notes, and snippets.

View abolishme's full-sized avatar

Tyler Reinhard abolishme

View GitHub Profile
#!/usr/bin/env ruby
# merge_asana_into_omnifocus.rb
# Hilton Lipschitz
# http://www.hiltmon.com
# Use and modify freely, attribution appreciated
# Script to import Asana projects and their tasks into
# OmniFocus and keep them up to date from Asana.

Using Calca for design

Below, the variables and examples were taken verbatim from [Using Soulver for design][sfd].

I'm just posting this as a reference, and example of sharing plain text documents for use within Calca. [sfd]: http://bjango.com/articles/soulver/

Variables and examples

iPhoneW = 320

@joshwlewis
joshwlewis / scss_format_validator.rb
Created November 19, 2012 20:09
Rails validation for scss (or sass)
# app/validators/scss_format_validator.rb
class ScssFormatValidator < ActiveModel::EachValidator
def validate_each(object, attribute, value)
begin
# Attempt to parse SCSS
Sass::Engine.new(value, syntax: :scss).render
rescue Exception => e
# Add error if parsing fails
object.errors.add(attribute, :invalid_scss, error: e.inspect)
end