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
desc 'Download and import the lastest backup from S3' | |
task import_backup: :environment do | |
# Configure AWS | |
AWS.config \ | |
access_key_id: Settings.aws.backup.key, | |
secret_access_key: Settings.aws.backup.secret, | |
region: Settings.aws.backup.region | |
# Download and extract backup file | |
bucket_name = 'kc-backups' |
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
import os | |
import sublime | |
import sublime_plugin | |
import threading | |
import subprocess | |
import functools | |
import os.path | |
import time | |
# when sublime loads a plugin it's cd'd into the plugin directory. Thus |
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 APIController < RocketPants::Base | |
include ActionController::Rendering, ActionController::MimeResponds, AbstractController::Layouts | |
append_view_path Rails.root.join('app', 'views') | |
... | |
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
10:35:04 ~/code/ack2 (dev) $ g co origin/faster-g | |
Note: checking out 'origin/faster-g'. | |
You are in 'detached HEAD' state. You can look around, make experimental | |
changes and commit them, and you can discard any commits you make in this | |
state without impacting any branches by performing another checkout. | |
If you want to create a new branch to retain commits you create, you may | |
do so (now or later) by using -b with the checkout command again. Example: |
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 Admin::PaypalController < AdminController | |
skip_load_and_authorize_resource | |
before_filter :load_current_account, except: :ipn | |
skip_before_filter :authenticate_admin_user!, :verify_authenticity_token, :redirect_to_dashboard_if_account_is_disabled, :redirect_to_dashboard_if_maintenance, only: :ipn | |
rescue_from PaypalNotification::RecordInvalid, with: :notify_airbrake_and_render_nothing | |
rescue_from PaypalNotification::ResponseInvalid, with: :notify_airbrake_and_render_nothing | |
rescue_from PaypalNotification::HandlingFailed, with: :notify_airbrake_and_render_nothing |
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
GIT | |
remote: git://github.com/rails/arel.git | |
revision: 24995298face1d08ffb52f6c1b0374feeb7a380b | |
specs: | |
arel (5.0.0.20140210193626) | |
GIT | |
remote: git://github.com/rails/rails.git | |
revision: 058d3c6183ef6e0e878bea37f4fe3f8f0d6758e2 | |
specs: |
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
unloading plugin Git.add | |
unloading plugin Git.annotate | |
unloading plugin Git.commit | |
unloading plugin Git.diff | |
unloading plugin Git.flow | |
reloading Packages/Git/Git Commit Message.sublime-settings | |
unloading plugin Git.git | |
unloading plugin Git.history | |
unloading plugin Git.repo | |
unloading plugin Git.stash |
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 Display::WidgetsController < ApplicationController | |
def show | |
scss = render_to_string('show', locals: { foo: bar }, formats: :scss) | |
@css = Sass::Engine.new(scss, Compass.sass_engine_options.merge(syntax: :scss)).render | |
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
require 'spork' | |
Spork.prefork do | |
require 'sidekiq/testing' | |
require 'capybara/rails' | |
require 'capybara/rspec' | |
require 'draper/test/rspec_integration' | |
ENV['RAILS_ENV'] ||= 'test' |
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
SELECT "taggable_models".* FROM (SELECT count("tags"."id") AS tags_count, taggable_models.* FROM "taggable_models" INNER JOIN "taggings" ON "taggings"."taggable_id" = "taggable_models"."id" AND "taggings"."taggable_type" = 'TaggableModel' INNER JOIN "tags" ON "tags"."id" = "taggings"."tag_id" WHERE "tags"."name" IN ('foo') GROUP BY "taggable_models"."id", "taggable_models"."user_id", "taggable_models"."name", "taggable_models"."type", "taggable_models"."foo" ORDER BY tags_count desc) taggable_models |