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
# Script to ease downloading of cookbooks from Opscode repo and Github | |
# by using a YAML file to describe the necessary cookbooks. | |
require 'yaml' | |
require 'fileutils' | |
script_dir = File.expand_path('.') | |
cookbooks_dir = File.join(script_dir, 'cookbooks') | |
archives_dir = File.join(script_dir, 'cookbooks_archives') |
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
site "http://community.opscode.com/api/v1" | |
## | |
# Base | |
# | |
cookbook "apt" | |
cookbook 'build-essential' | |
cookbook 'git' |
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 'sinatra/base' | |
module Sinatra | |
module JstHamlAssets | |
module Helpers | |
def not_found | |
[404, 'JST Haml template not found'] | |
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 'sinatra/base' | |
module Sinatra | |
module JstHamlAssets | |
module Helpers | |
def not_found | |
[404, 'JST Haml template not found'] | |
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
- if flash | |
- flash.each do |level, message| | |
%div{:class => "alert #{flash_level(level)}"} | |
%button.close{:"data-dismiss" => 'alert'}= "×" | |
= message |
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
-- This script... | |
-- It assumes when you ssh into the vagrant box you automatically cd into | |
-- the project's directory (by having a `cd /vagrant` within your | |
-- `~/.bashrc` for example) | |
using terms from application "Terminal" | |
tell application "Terminal" | |
activate | |
-- open the terminal's window, set its dimensions |
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
# This Rack middleware helps solving the issue with some Rails versions which do not accept | |
# a '*/*;q=0.6' and their variants 'Accept' request header. This header is particularly used | |
# by Google Bot, and if Rails doesn't like it, it will return a 500 or 406 error to Google Bot, | |
# which is not the best way to get your pages indexed. | |
# | |
# References: | |
# - http://stackoverflow.com/questions/8881756/googlebot-receiving-missing-template-error-for-an-existing-template | |
# - https://github.com/rails/rails/issues/4127 | |
# | |
class GoogleBotAware |
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
[2012/04/27 09:00:05][message] Backup for 'App DB - frequent (db_frequent)' Completed Successfully in 00:00:03 | |
[2012/04/27 09:08:02][message] Performing Backup for 'App files (system - avatars, qrcodes) (files)'! | |
[2012/04/27 09:08:02][message] [ backup 3.0.24 : ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux] ] | |
[2012/04/27 09:08:02][message] Syncer::Cloud::S3 started the syncing process: | |
[2012/04/27 09:08:03][message] Generating checksums for '/home/user/rails/app/shared/system' | |
[2012/04/27 09:08:05][message] [skipping] 'files/system/avatars/10/... | |
[2012/04/27 09:08:05][message] [skipping] 'files/system/avatars/10/... | |
[2012/04/27 09:08:05][message] [skipping] 'files/system/avatars/10/... | |
[2012/04/27 09:08:05][message] [skipping] 'files/system/avatars/10/... | |
[2012/04/27 09:08:05][message] [skipping] 'files/system/avatars/100/... |
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 GitHubApi = require("github"); | |
var user = "ajaxorg"; | |
var repos = ["ace", "cloud9"]; | |
var github = new GitHubApi({ | |
version: "3.0.0" | |
}); | |
repos.forEach(function(repo) { |
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
# features/support/hooks.rb | |
# This ensure SslRequirement is enabled for all scenarios, except | |
# if stated otherwise elsewhere (such as within Before('@javascript@')) | |
Before do | |
SslRequirement.disable_ssl_check = false | |
end | |
Before('@javascript') do | |
SslRequirement.disable_ssl_check = true |