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
pipeline { | |
agent any | |
parameters { | |
string(name: 'environment', defaultValue: 'default', description: 'Workspace/environment file to use for deployment') | |
string(name: 'version', defaultValue: '', description: 'Version variable to pass to Terraform') | |
booleanParam(name: 'autoApprove', defaultValue: false, description: 'Automatically run apply after generating plan?') | |
} | |
environment { |
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 SignupSuccessForm | |
include ActiveModel::Model | |
attr_accessor :validation_token | |
attr_accessor :transaction_id | |
attr_reader :order | |
validates_presence_of :validation_token, :transaction_id | |
validate :order_must_exist |
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 "action_mailer" | |
require "qe" | |
class Mailer < ActionMailer::Base | |
def welcome(options) | |
@options = options | |
mail :to => options[:email] | |
end | |
end |
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
// "scriptizao" pra baixar os resultados depois de executados | |
public class DownloadResults { | |
public static void main(String[] args) throws FileNotFoundException { | |
Scanner results = new Scanner(new File("test-ids.txt")); | |
while (results.hasNextLine()) { | |
String[] result = results.nextLine().split("\\s+"); | |
String testId = result[0]; | |
String domain = result[1]; |
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
#Add new user to deploy your application on Ubuntu 10.10 | |
useradd -s /bin/bash -m app-user # add user | |
passwd app-user # change password | |
#in /usr/sbin/visudo Add line below just below 'root ALL=(ALL) ALL': | |
app-user ALL=(ALL) ALL | |
#change to user early created | |
su app-user |
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
sudo echo " | |
https_proxy='http://10.0.0.1:3128' | |
http_proxy='http://10.0.0.1:3128' | |
ftp_proxy='10.0.0.1:3128' | |
Acquire { | |
HTTP::Proxy 10.0.0.1:3128; | |
FTP::Proxy 10.0.0.1:3128; | |
}; |
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
Deploying a Rails 3 App with EC2 + S3 + Ubuntu + Capistrano + Passenger | |
======================================================================= | |
EC2 Setup | |
--------- | |
1 Launch New ec2 instance - ami-1634de7f | |
2 Create elastic IP [ELASTIC_IP] and associate it with instance | |
3 go to domain registrar DNS settings, @ and www to ELASTIC_IP | |
4 set the `:host` in `config/deploy.rb` to ELASTIC_IP |