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
#encoding: utf-8 | |
gem 'rails', '3.2.8' | |
gem 'squeel', '1.0.9' | |
require 'active_record' | |
require 'squeel' | |
require 'squeel/version' |
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
[general] | |
static=yes | |
writeprotect=yes | |
clearglobalvars=no | |
[internal] | |
include => parkedcalls |
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
# Bluepill - Chef server | |
# | |
# simple process monitoring tool | |
description "Chef server" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
expect daemon |
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
Bluepill.application("chef-server") do |app| | |
BIN_PATH = "/usr/local/ruby/bin" | |
app.process("expander") do |process| | |
process.pid_file = "/var/run/chef-expander.pid" | |
process.working_dir = "/var/lib/chef" | |
process.start_command = "#{BIN_PATH}/chef-expander -P /var/run/chef-expander.pid -n1" | |
process.stdout = process.stderr = "/var/log/chef/expander.log" |
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
#!/bin/bash | |
/usr/bin/apt-get update | |
/usr/bin/apt-get install -y build-essential git-core curl bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake ruby libffi5 libffi-dev | |
RUBY_PATH=/usr/local/ruby | |
YAML_PATH=/usr/local/yaml | |
ruby='1.9.3-p125' |
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 "rubygems" | |
require "bundler/setup" | |
require "httpclient" | |
require "savon" | |
client = Savon::Client.new do | |
wsdl.document = "http://www.27seconds.com/Holidays/US/Dates/USHolidayDates.asmx?WSDL" | |
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
$(function(){ | |
$("#new_post").bind("ajax:loading", function(e, xhr) { | |
alert(xhr); | |
}); | |
}); |
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
<%= form_for @post, :url => search_posts_path() , :remote => true, :html => {:method => :get, "data-type" => "html"} do |f| %> | |
<%= f.label :header, "Header" %> <%= f.text_field :header %> | |
<br/> | |
<%= f.label :header, "Body" %> <%= f.text_field :body %> | |
<%= f.submit "Ok" %> | |
<% 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 "action_mailer" | |
ActionMailer::Base.smtp_settings = { | |
:address => "smtp.gmail.com", | |
:port => 587, | |
:domain => "railscasts.com", | |
:user_name => "railscasts", | |
:password => "secret", | |
:authentication => "plain", | |
:enable_starttls_auto => true |