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 is a manifest file that'll be compiled into application.js, which will include all the files | |
| // listed below. | |
| // | |
| // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, | |
| // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. | |
| // | |
| // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | |
| // the compiled file. | |
| // | |
| // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD |
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 | |
| git add --all | |
| git commit -am $1 | |
| git push origin master | |
| git push live master | |
| cap deploy:update | |
| cap deploy:migrate | |
| cap deploy:cleanup -s keep_releases=1 | |
| cap deploy:restart |
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
| I. Format All Emails | |
| a. Confirmation Email (with plan pricing, when your CC will be charged) | |
| b. Notification email-- | |
| II. Add facebook/Tweet button to "thank you page" | |
| III. Wire up dashboard | |
| IV. openstack vs cloudservers GEM | |
| a. UK vs US integration |
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
| cs = OpenStack::Compute::Connection.new(:username => USERNAME, :api_key => API_KEY, :authtenant => TENANT, :auth_url => API_URL) | |
| NameError: uninitialized constant OpenStack | |
| from (irb):1 | |
| from /home/aa/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/commands/console.rb:47:in `start' | |
| from /home/aa/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/commands/console.rb:8:in `start' | |
| from /home/aa/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.3/lib/rails/commands.rb:41:in `<top (required)>' | |
| from script/rails:6:in `require' | |
| from script/rails:6:in `<main>' | |
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
| def index | |
| @servers = current_user.servers | |
| @servers.each do |server| | |
| @databases = Spice.get("/nodes/#{server.domain_name}") | |
| end | |
| 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
| def create | |
| plan = params[:subscription][:plan] | |
| params[:subscription].delete(:plan) | |
| @subscription = Subscription.new(params[:subscription]) | |
| @subscription.plan = plan | |
| @user = User.new(params[:user]) | |
| respond_to do |format| | |
| if @subscription.save_with_payment(@subscription.plan, @user.email) && @user.save | |
| @subscription.user_id = @user.id | |
| @subscription.save |
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
| li.innerHTML = '<h3><a href="' + entry.link + '">' + entry.title + '</a>' + '<cite>by ' + entry.author + '</cite></h3>'; |
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
| /etc/postgresql/9.1/main/pg_hba.conf | |
| # Database administrative login by Unix domain socket | |
| local all postgres peer | |
| # TYPE DATABASE USER ADDRESS METHOD | |
| # "local" is for Unix domain socket connections only | |
| local all all peer | |
| # IPv4 local connections: |
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
| Spice.post("/data/user_ips",@databag) | |
| => {"error"=>["Data Bag items must have an id matching /^[\\-[:alnum:]_]+$/, you gave: nil"]} | |
| ruby-1.9.3-rc1 :141 > @databag = Spice.data_bag("user_ips") | |
| => #<Spice::DataBag:0x000000046092e0 @attrs={"name"=>"user_ips", "items"=>[]}> | |
| ruby-1.9.3-rc1 :142 > @databag.items = [{id: "user-ips"}] | |
| => [{:id=>"user-ips"}] | |
| ruby-1.9.3-rc1 :143 > Spice.post("/data/user_ips",@databag) | |
| => {"error"=>["Data Bag items must have an id matching /^[\\-[:alnum:]_]+$/, you gave: nil"]} | |
| ruby-1.9.3-rc1 :144 > @databag.items | |
| => [{:id=>"user-ips"}] |
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
| ruby-1.9.3-rc1 :222 > @data_bag.attrs{"items"} | |
| => {"name"=>"remote-pg-ip", "items"=>[#<Spice::DataBagItem:0x000000061e6468 @attrs={"client_ip"=>"71.85.232.80", "id"=>"dpq7yoky2sw4tg"}>]} | |
| ruby-1.9.3-rc1 :223 > @data_bag.attrs | |
| => {"name"=>"remote-pg-ip", "items"=>[#<Spice::DataBagItem:0x000000061e6468 @attrs={"client_ip"=>"71.85.232.80", "id"=>"dpq7yoky2sw4tg"}>]} | |
| ruby-1.9.3-rc1 :224 > @data_bag.attrs.class | |
| => Hash |