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
| curl -X GET \ | |
| -H "X-Auth-Token: $OS_AUTH_TOKEN" \ | |
| "https://lon.images.api.rackspacecloud.com/v2/tasks/$TASK_IDb" | python -m json.tool | |
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
| find . -name "*.haml" | while read i; do haml -f xhtml -q "$i" "${i%.*}.html"; done |
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
| # Script to delete all but a specified list of tags | |
| # from a git repo, both locally and remotely | |
| # Run like `mode=test ruby git_tag_cleanup` to test; | |
| # use 'execute' mode to actually delete the tags | |
| mode = ENV['mode'] || 'test' | |
| tags_to_keep = %w[v2.0.0 v2.0.1] | |
| tags_to_delete = `git tag`.split("\n") - tags_to_keep |
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
| ✗ grep will_paginate * -R | xargs sed -i 's/will_paginate/paginate/g' |
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
| %h3 Update status | |
| = form_for(@shipment, url: update_shipment_admin_purchase_url(@purchase, shipment_id: @shipment.id), html: {method: :put, class: 'neat'}) do |f| | |
| = f.select :status, options_for_select(shipment_status(@shipment)), {include_blank: '-- Choose status --'}, { 'ng-model' => "ShipmentStatus", 'ng-change' => 'ShipmentStatusChange()' } | |
| %div{ 'ng-include' => "statusFieldset" } | |
| %script#shippedFieldset{type: "text/ng-template"} | |
| %fieldset | |
| = f.label :tracking_code, "Tracking Code" | |
| = f.text_field :tracking_code | |
| = f.label :tracking_website, "Tracking Website" |
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 'yaml' | |
| desc 'Generates database.yml, optional arguments: [adapter, user, password]' | |
| task :dbconfig => 'database.yml' | |
| file 'database.yml', [:adapter, :username, :password] do |t, args| | |
| Dir.chdir('config') | |
| args.with_defaults(:project_path => Dir.pwd) | |
| DBConfigGenerator.new(t, args).generate | |
| 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
| group :production do | |
| gem 'unicorn' | |
| # Enable gzip compression on heroku, but don't compress images. | |
| gem 'heroku-deflater' | |
| # Heroku injects it if it's not in there already | |
| gem 'rails_12factor' | |
| 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
| source 'https://rubygems.org' | |
| gem 'activerecord', '4.0.0.rc1' |
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
| #!/usr/bin/env ruby -w | |
| require 'rubygems' | |
| require 'fog' | |
| require 'pp' | |
| AWS_ACCESS_KEY = ENV['AWS_ACCESS_KEY_ID'] | |
| AWS_SECRET_KEY = ENV['AWS_SECRET_ACCESS_KEY'] | |
| def get_cf_connection() |
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
| #!/usr/bin/env ruby | |
| require "sidekiq" | |
| Sidekiq.configure_client do |config| | |
| config.redis = { size: 1 } | |
| end | |
| require "sidekiq/web" | |
| Sidekiq::Web.use Rack::Auth::Basic do |username, password| |