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 MyApp | |
| module Extensions | |
| module Page | |
| def self.included(base) | |
| base.class_eval do | |
| belongs_to :account | |
| 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
| class Object | |
| def eigenclass | |
| class << self | |
| return self | |
| end | |
| end | |
| end | |
| class Person | |
| def hello |
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
| DOMAIN = "smackaho.st" | |
| Given /^I am in subdomain "(.+)"$/ do |subdomain| | |
| if Capybara.current_driver == :webkit | |
| port = page.driver.instance_variable_get(:@rack_server).port | |
| Capybara.app_host = "http://#{subdomain}.#{DOMAIN}:#{port}" | |
| else | |
| Capybara.default_host = "http://#{subdomain}.#{DOMAIN}" | |
| switch_session(subdomain) | |
| visit("http://#{subdomain}.#{DOMAIN}") |
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 HstoreSerializer | |
| extend ActiveSupport::Concern | |
| module ClassMethods def hstore_array(*attributes) | |
| attributes.each do |attr| | |
| define_method "#{attr}=" do |values| | |
| self[attr] = convert_to_hash(values) | |
| end | |
| define_method attr do |
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
| /* | |
| fetch | |
| fetch the sharing div | |
| */ | |
| fetch: function(element) { | |
| if (sharing.debug) { $.d('Fetch'); $.d(element); } |
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
| ~ $ ./Downloads/tz_world_ingredients/world/process.sh | |
| ./Downloads/tz_world_ingredients/world/process.sh: line 9: psql.exe: command not found | |
| Unable to open ../../fips_10/map/fips10s.shp or ../../fips_10/map/fips10s.SHP. | |
| ../../fips_10/map/fips10s: dbf file (.dbf) can not be opened. | |
| Unable to open ../canada/tz_canada_01.shp or ../canada/tz_canada_01.SHP. | |
| ../canada/tz_canada_01: dbf file (.dbf) can not be opened. | |
| Unable to open ../canada/tz_canada_02.shp or ../canada/tz_canada_02.SHP. | |
| ../canada/tz_canada_02: dbf file (.dbf) can not be opened. | |
| Unable to open ../canada/tz_canada_03.shp or ../canada/tz_canada_03.SHP. | |
| ../canada/tz_canada_03: dbf file (.dbf) can not be opened. |
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
| ~/Downloads/tz_world_ingredients/world $ sh process.sh | |
| process.sh: line 9: psql.exe: command not found | |
| Unable to open ../../fips_10/map/fips10s.shp or ../../fips_10/map/fips10s.SHP. | |
| ../../fips_10/map/fips10s: dbf file (.dbf) can not be opened. | |
| Shapefile type: Polygon | |
| Postgis type: POLYGON[2] | |
| SET | |
| SET | |
| BEGIN | |
| ERROR: relation "tz_canada_mask" does not exist |
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 sync | |
| loop do | |
| User.transaction do | |
| @supporter_batch = supporter_batch_relation.lock | |
| @supporters = @supporter_batch.to_a | |
| break if @supporters.size <= MIN_BATCH_SIZE | |
| @supporter_batch.update_all(mail_service_identifier: 'pending') | |
| end | |
| @supporters.map do |supporter| | |
| sync_supporter(supporter) |
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 ::File.expand_path('../config/environment', __FILE__) | |
| require ::File.expand_path('../lib/slack_bot', __FILE__) | |
| Thread.abort_on_exception = true | |
| Apartment.tenant_names.each do |schema| | |
| if token = ENV["#{schema.upcase}_SLACK_API_TOKEN"] | |
| Thread.new do | |
| SlackBot.new(schema, token).bot.run | |
| 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
| class GradeCam::Launch | |
| attr_reader :assessment_session, :user, :url | |
| def initialize(assessment_session, user, url) | |
| @assessment_session, @user, @url = assessment_session, user, url | |
| end | |
| def params | |
| @params ||= { context_id: assessment_session.classroom.id, |
OlderNewer