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
| Webhook URL: https://<api_gateway_url>/prod/uploadEmail?user_id={{${user_id}}}&template_name=<template_name> | |
| Request Body: (select raw text), paste in entire email HTML |
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
| module Minitest | |
| def self.plugin_aggregate_init | |
| reporter << Aggregate.new | |
| end | |
| class Aggregate | |
| attr_accessor :branch | |
| attr_accessor :build | |
| attr_accessor :failed_tests | |
| attr_accessor :timestamp |
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
| class BarcodeAnalyser | |
| def call(app, opts = {}) | |
| # OS X: `brew install zbar` | |
| # Ubuntu: `apt-get install zbar-tools` | |
| app.env[:zbar_command] = opts[:zbar_command] || 'zbarimg' | |
| app.define :barcode do | |
| @barcode ||= begin | |
| shell_eval { |path| "#{app.env[:zbar_command]} -q --raw #{path}" } | |
| rescue Dragonfly::Shell::CommandFailed => e |
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 'dragonfly' | |
| require 'exif_analyser' | |
| Dragonfly.app.configure do | |
| plugin ExifAnalyser.new | |
| 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
| atom.workspaceView.command 'last-migration', -> | |
| migrate_directory = atom.project.getRootDirectory() | |
| migrate_directory.path = "#{migrate_directory.path}/db/migrate" | |
| last_migration = migrate_directory.getEntriesSync().pop() | |
| atom.open | |
| pathsToOpen: [last_migration.path] |
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
| path = require 'path' | |
| atom.workspaceView.eachEditorView (editorView) -> | |
| editor = editorView.getEditor() | |
| grammar = switch path.extname(editor.getPath()) | |
| when '.rb' then atom.syntax.grammarsByScopeName['source.ruby.rails'] | |
| when '.erb' then atom.syntax.grammarsByScopeName['text.html.ruby'] |
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
| ###---------------------------------------------------- Class Methods | |
| def sale_type | |
| @sale_type ||= Sale.sale_type_ids[ self.sale_type_id - 1 ][0] | |
| end | |
| ###---------------------------------------------------- Class Methods | |
| def self.sale_type_ids |
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 'lorem' | |
| class ApplicationController < ActionController::Base | |
| layout 'public' | |
| helper_method :lorem | |
| def lorem | |
| @lorem ||= LoremObject.new | |
| 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
| load 'deploy/assets' | |
| namespace :deploy do | |
| namespace :assets do | |
| desc 'Run the precompile task locally and rsync with shared' | |
| task :precompile, :roles => :web, :except => { :no_release => true } do | |
| %x{bundle exec rake assets:precompile} | |
| %x{rsync --recursive --times --rsh=ssh --compress --human-readable --progress public/assets #{user}@#{host}:#{shared_path}} | |
| %x{bundle exec rake assets:clean} | |
| 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
| require 'test_helper' | |
| require 'capybara/rails' | |
| require 'devise/test_helpers' | |
| class ActionController::IntegrationTest | |
| include Capybara::DSL | |
| include Warden::Test::Helpers | |
| self.use_transactional_fixtures = false |
NewerOlder