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
ron-evanss-macbook-pro-15:mysql-plugin-test-app ron$ pool -v start | |
-- PoolParty cloud: MySql Plugin Test App | |
On ami-4bb05422 | |
Minimum instances: 1 | |
Maximum instances: 4 | |
Polling every: 30.seconds | |
Keypair: mysql-test | |
Access key: 0CT2X9HAFADR370JWN02 | |
size: m1.small | |
Monitors available: |
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
=begin rdoc | |
PoolParty plugin to install and configure mysql on any instance designated as a database instance. | |
Written by Ron Evans (http://deadprogrammersociety.com) | |
Features of the current plugin: | |
- Installs current Mysql | |
- Does live database backup to S3 once every hour | |
- If the instance goes down, will automatically bring up another one, and restore latest backup | |
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
$ pool -v -i start | |
-- PoolParty cloud: MySql Plugin Test App | |
On ami-4bb05422 | |
Minimum instances: 1 | |
Maximum instances: 4 | |
Polling every: 30.seconds | |
Keypair: mysql-test | |
Access key: 0CT2X9HAFADR370JWN02 | |
size: m1.small | |
Monitors available: |
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
solution :myapp do | |
cloud :db do | |
mysql :master => 1, :max_slaves => 4 | |
end | |
cloud :web do | |
rails ... | |
nginx ... | |
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
pool :poolpartyrb do | |
plugin_directory "plugins" | |
cloud :app do | |
# Configuration | |
configure { :maximum_instances => 1, :keypair => "name" } | |
minimum_instances 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
Host exerpoints.unfuddle.com | |
User git | |
IdentityFile ~/.ssh/id_rsa |
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 VitalStatType | |
attr_accessor :title, :value_type. :possible_values | |
end | |
VitalStat::Gender = VitalStatType.new(:title => 'Gender', :value_type => :select, :possible_values => {:male => 'Male', :female => 'Female'}) | |
VitalStat::Age = VitalStatType.new(:title => 'Age', :value_type => :number) | |
VitalStat::Ethnicity = VitalStatType.new(:title => 'Ethnicity', :value_type => :multiple, :possible_values => | |
{ :african_american => 'African American', | |
:american_indian => 'American Indian', | |
:asian => 'Asian', |
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 VitalStatType | |
attr_accessor :title, :possible_values | |
def conditions | |
end | |
end | |
class VitalStatSelectType < VitalStatType | |
def conditions | |
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
sql << (" AND (list_entries.site = '" + domain + "'") | |
sql << (" OR list_entries.site = '" + subdomain + "'" ) | |
current_subdir = subdomain.chomp("/") | |
subdirs.split("/").each do |dir| | |
current_subdir = current_subdir + "/" + dir | |
sql << " OR list_entries.site = '" + current_subdir + "'" | |
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
// Create the web request | |
HttpWebRequest request | |
= WebRequest.Create("https://api.del.icio.us/v1/posts/recent") as HttpWebRequest; | |
// Add authentication to request | |
request.Credentials = new NetworkCredential("username", "password"); | |
// Get response | |
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse) | |
{ |
OlderNewer