- Susy Grid: A grid that you build with Susy. You can have multiple on one page if you need.
- Grid Element: Any HTML element that is aligned to a Susy Grid.
- Container: The root element in a Susy Grid. Anything inside it is a potential Grid Element.
- Context: Either root (default) or the number of columns spanned by the parent Grid Element.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Chef | |
module Mixin | |
module ConsumeJson | |
def consume_json(url) | |
Chef::Log.debug "consume_json: requesting url: #{url}" | |
info = nil | |
fetch(url) do |data| | |
info = JSON.parse(data) | |
Chef::Log.debug "consume_json: parsed: #{info.inspect}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
gem 'sprockets' | |
gem 'sprockets-sass' | |
gem 'sass' | |
gem 'compass' | |
gem 'bootstrap-sass' | |
gem 'handlebars_assets' | |
gem 'coffee-script' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'md5' | |
class Chargify::HooksController < ApplicationController | |
protect_from_forgery :except => :dispatch | |
before_filter :verify, :only => :dispatch | |
EVENTS = %w[ test signup_success signup_failure renewal_success renewal_failure payment_success payment_failure billing_date_change subscription_state_change subscription_product_change ].freeze | |
def dispatch | |
event = params[:event] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update, upgrade and install development tools: | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install build-essential | |
apt-get -y install git-core | |
# Install rbenv | |
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
# Add rbenv to the path: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Capybara Webkit focus test | |
In order to show that Capybara Webkit does not allow an element to maintain focus | |
I created this feature | |
Which anyone can try | |
@javascript | |
Scenario: Run demo page | |
When I am on the capybara demo page | |
Then I should see a successful result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
require 'sinatra' | |
set server: 'thin', connections: [] | |
get '/' do | |
halt erb(:login) unless params[:user] | |
erb :chat, locals: { user: params[:user].gsub(/\W/, '') } | |
end | |
get '/stream', provides: 'text/event-stream' do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant::Config.run do |config| | |
# ... | |
config.vm.customize do |vm| | |
# Use the host resolver for DNS so that VPN continues | |
# to work within the VM | |
vm.network_adapters.each do |na| | |
if na.enabled? && na.nat_driver | |
na.nat_driver.dns_use_host_resolver = true | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'selenium-webdriver' | |
pr = Selenium::WebDriver::Firefox::Profile.new | |
pr.native_events = true | |
d = Selenium::WebDriver.for :firefox, :profile => pr | |
d.get "http://jqueryui.com/demos/sortable/" | |
list = d.find_element(:id, 'sortable').find_elements(:tag_name, 'li') | |
d.action.drag_and_drop_by(list[0], 0, 200).perform |
NewerOlder