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
| #!/usr/bin/env bash | |
| RUBY_VERSION=ruby-2.0.0-p247 | |
| apt-get -y update | |
| apt-get -y install build-essential libyaml-dev zlib1g-dev openssl libssl-dev libreadline-gplv2-dev | |
| cd /tmp | |
| wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/$RUBY_VERSION.tar.gz | |
| tar -xvzf $RUBY_VERSION.tar.gz | |
| cd $RUBY_VERSION/ | |
| sudo ./configure --prefix=/usr/local | |
| sudo make |
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
| var express = require('express'); | |
| var app = express.createServer(); | |
| app.configure(function() { | |
| var pub = __dirname + "./public"; | |
| pub = require("path").normalize(pub); | |
| app.set('views', __dirname + '/views'); | |
| app.set('view engine', 'jade'); | |
| }); |
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
| Capybara.register_driver :rack_test do |app| | |
| Capybara::RackTest::Driver.new(app, | |
| redirect_limit: 15, | |
| follow_redirects: true, | |
| respect_data_method: 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
| <!doctype html> | |
| <meta charset="utf-8"> | |
| <div id="block"></div> | |
| <script src="http://d3js.org/d3.v3.min.js"></script> | |
| <style type="text/css"> | |
| .block { | |
| font: 10px sans-serif; | |
| shape-rendering: crispEdges; | |
| padding: 25px 0; | |
| } |
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
| include Trello | |
| include Trello::Authorization | |
| Trello::Authorization.const_set :AuthPolicy, OAuthPolicy | |
| OAuthPolicy.consumer_credential = OAuthCredential.new('user_key', 'user_secret') | |
| threads = [] | |
| tokens = %w[ not_rosstas_token rosstas_token ] | |
| tokens.each_with_index do |token, i| |
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
| <!DOCTYPE html> | |
| <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
| <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
| <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
| <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <title></title> | |
| <meta name="description" content=""> |
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
| <!DOCTYPE html> | |
| <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
| <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
| <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
| <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <title></title> | |
| <meta name="description" content=""> |
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
| module MyModule | |
| extend ActiveSupport::Concern | |
| # removed code that modified User when | |
| # including this module in Article | |
| end | |
| module OrderedByCounter | |
| extend ActiveSupport::Concern | |
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
| RSpec.configure do |config| | |
| config.around(:each, :caching) do |example| | |
| caching = ActionController::Base.perform_caching | |
| ActionController::Base.perform_caching = example.metadata[:caching] | |
| example.run | |
| Rails.cache.clear | |
| ActionController::Base.perform_caching = caching | |
| end | |
| 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
| # Don't need passwords in test DB to be secure, but we would like 'em to be | |
| # fast -- and the stretches mechanism is intended to make passwords | |
| # computationally expensive. | |
| module Devise | |
| module Models | |
| module DatabaseAuthenticatable | |
| protected | |
| def password_digest(password) | |
| password |