This file contains 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
brew uninstall v8 | |
gem install therubyracer -v '$YOUR_VERSION_HERE' | |
brew install v8 | |
gem install libv8 -v '$YOUR_VERSION_HERE' -- --with-system-v8 |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- Copyright Zuora, Inc. 2007 - 2010 All Rights Reserved. --> | |
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" | |
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" | |
xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" | |
xmlns:zns="http://api.zuora.com/" | |
xmlns:ons="http://object.api.zuora.com/" |
This file contains 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
--- | |
- name: Ensure we can add apt repos | |
apt: pkg=python-software-properties state=latest update_cache=yes | |
sudo: yes | |
- name: configure apt for first run | |
sudo: yes | |
shell: apt-get install -f |
This file contains 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
- name: Update apt | |
apt: update_cache=yes | |
sudo: yes | |
- name: install nginx and needed packages | |
apt: pkg=$item state=latest force=yes | |
sudo: yes | |
with_items: | |
- libpcre3 | |
- libpcre3-dev |
This file contains 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
--- | |
- name: Update apt | |
apt: update_cache=yes | |
sudo: yes | |
- name: install dev packages | |
apt: pkg=$item state=latest | |
sudo: yes | |
with_items: | |
- git-core |
This file contains 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
--- | |
- name: Update apt | |
apt: update_cache=yes | |
sudo: yes | |
- name: install db packages (need to be forced; cannot be verified) | |
apt: pkg=$item state=latest force=yes | |
sudo: yes | |
with_items: | |
- python-mysqldb |
This file contains 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
--- | |
- name: add apt repo for redis | |
# from http://ph.ly/dotdeb | |
apt_repository: repo="deb http://packages.dotdeb.org squeeze all" | |
sudo: yes | |
- name: Update apt | |
apt: update_cache=yes | |
sudo: yes |
This file contains 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 Entry | |
attr_accessor :author_name, :author_email, :title, :body, :semester | |
def initialize(author_name, author_email, title, body, semester, date_of_submission) | |
@author_name = author_name | |
@author_email = author_email | |
@title = title | |
@body = body | |
@semester = semester # "200(8|9) (Spring|Fall)" | |
end | |
def self.all |
This file contains 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' | |
get '/' do | |
haml :index | |
end | |
get '/result' do | |
missed_fields = params.keys.select {|key| params[key].blank? } | |
haml :index and return if missed_fields |
This file contains 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' | |
get '/' do | |
haml :index | |
end | |
get '/result' do | |
loan_eligibility = params[:loan_length]/params[:loan_amount] + params[:income] - params[:expenses] | |
haml :result | |
end |