Skip to content

Instantly share code, notes, and snippets.

@sskylar
sskylar / config.ru
Created February 27, 2015 20:21
Siteleaf config using ENV variables
# Intended for development purposes only, do not upload or use in production.
# See https://github.com/siteleaf/siteleaf-gem for documentation.
require 'rubygems'
require 'siteleaf'
Siteleaf.api_key = ENV['API_KEY']
Siteleaf.api_secret = ENV['API_SECRET']
run Siteleaf::Server.new(:site_id => ENV['SITE_ID'])
@asimpson
asimpson / jekyll-siteleaf.rb
Last active August 29, 2015 13:56 — forked from sskylar/jekyll-siteleaf.rb
Automatically post all Jekyll posts to Siteleaf via Siteleaf API.
require "siteleaf"
require "yaml"
# API settings
Siteleaf.api_key = ''
Siteleaf.api_secret = ''
# site settings
extension = 'md' # set this to whatever extension you are using for your posts.
site_id = ''
@dnagir
dnagir / rspec-syntax-cheat-sheet.rb
Created November 5, 2010 09:29
RSpec 2 syntax cheat sheet by example
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")