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 ActiveRecordComparer | |
| def initialize(original, new) | |
| @original = original | |
| @new = new | |
| end | |
| def method_missing(m, *arg) | |
| puts arg | |
| @original = @original.send(m, *arg) | |
| @new = @new.send(m, *arg) |
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
| desc 'Determine if Resque is Alive or not' | |
| task :liveness, [:queue_name] => [:environment] do |_task, args| | |
| Resque.workers.select { |w| w.hostname == Socket.gethostname }.each do |worker| | |
| begin | |
| Process.kill(0, worker.pid) | |
| rescue Errno::ESRCH | |
| puts "Dead: Resque process with pid #{worker.pid} should exist, but cannot be found." | |
| exit 1 | |
| 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
| module Etl | |
| class Liveness | |
| extend Forwardable | |
| ProcessInfo = Struct.new(:pid, :text) | |
| def initialize(command_runner: CommandRunner) | |
| @command_runner = command_runner | |
| 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
| # app@1290894361f7:/opt/app$ pgrep -af resq | |
| # 461 resque-1.26.0: Waiting for etl_applicant_deferred_heavyweight | |
| # 464 resque-1.26.0: Waiting for cas_3_gpa_deferred_heavyweight | |
| # | |
| # app@1290894361f7:/opt/app$ pgrep -af resq | |
| # 461 resque-1.26.0: Forked 1698 at 1484951377 | |
| # 464 resque-1.26.0: Waiting for cas_3_gpa_deferred_heavyweight | |
| # 1698 resque-1.26.0: Processing etl_applicant_deferred_heavyweight since 1484951377 [Etl::ApplicantJob] | |
| # | |
| # for each queue: |
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 alive | |
| 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
| version: '2' | |
| services: | |
| msql: | |
| image: microsoft/mssql-server-linux | |
| environment: | |
| - ACCEPT_EULA=Y | |
| - SA_PASSWORD=1337Password |
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
| version: '2' | |
| services: | |
| etl: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile | |
| command: sleep infinity | |
| volumes: | |
| - .:/opt/app |
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
| kstevens@liaison-dell:~$ sudo apt-get install mssql-server | |
| Reading package lists... Done | |
| Building dependency tree | |
| Reading state information... Done | |
| Some packages could not be installed. This may mean that you have | |
| requested an impossible situation or if you are using the unstable | |
| distribution that some required packages have not yet been created | |
| or been moved out of Incoming. | |
| The following information may help to resolve the situation: |
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 UserIdentity | |
| def cas_attachments | |
| sql = id_column.in(cas_attachment_belongs_to_my_cas).or(id_column.in(cas_attachment_belongs_to_my_programs)) | |
| CasAttachment.where(sql) | |
| end | |
| def table | |
| CasAttachment.arel_table | |
| 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
| " Installing plugins to /home/kstevens/.vim/bundle | |
| Plugin 'gmarik/Vundle.vim' | |
| Plugin 'Quramy/vim-js-pretty-template' | |
| Plugin 'bling/vim-airline' | |
| Plugin 'jelera/vim-javascript-syntax' | |
| Plugin 'kien/ctrlp.vim' | |
| Plugin 'mattn/webapi-vim' | |
| Plugin 'mattn/gist-vim' | |
| Plugin 'mileszs/ack.vim' | |
| Plugin 'sickill/vim-monokai' |