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
| [ | |
| [0] { | |
| :text => "Less than 54,000", | |
| :data_point_uid => "companymo1", | |
| :uid => "lessthan51" | |
| }, | |
| [1] { | |
| :text => "54,001 - 268,000", | |
| :data_point_uid => "companymo1", | |
| :uid => "5400126801" |
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
| { | |
| "raw_data":{ | |
| "member_reference_number":48192, | |
| "user_id":"BB03000104", | |
| "first_name":"Jacqueline", | |
| "last_name":"del Rosario", | |
| "civil_status":"S", | |
| "date_of_birth":"1981-09-14T00:00:00.000+07:30", | |
| "gender":"1", | |
| "ac_holder_type":"HI", |
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 UpdateAddressOfASchool < ActiveRecord::Migration | |
| def up | |
| ['Ateneo', 'UP'].each do |name| | |
| school = School.where(name: name).first | |
| if school | |
| school.update_attributes(address: "Quezon City") | |
| end | |
| end | |
| 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
| module HealthCheck | |
| class SlackNotification | |
| attr_accessor :health_check | |
| def initialize(health_check) | |
| @health_check = health_check | |
| end | |
| def send | |
| if beyond_threshold? && activated? && !Rails.env.development? |
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
| javascript:(function() { document.getElementById('new_comment_field').value="``` | |
| . | |
| .'| .8 | |
| . | .8: | |
| . | .8;: .8 | |
| . | .8;;: | .8; | |
| . n .8;;;: | .8;;; | |
| . M.8;;;;;: |,8;;;;; | |
| . .,'n8;;;;;;: |8;;;;;; | |
| . .', n;;;;;;;: M;;;;;;;; |
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
| # https://github.com/fholgado/minibufexpl.vim | |
| # ':edit' --> to open another file in vim and creating a new buffer | |
| # ':new' --> to open another file in vim and creating an empty | |
| # ':b2' --> to open a buffer with label '2' | |
| # Commnad ':MBEbd', ':MBEbw' or ':MBEbun' could be used to delete/wipeout/unload buffers just as ':bd', ':bw' or ':bun', but the window that previously holding them will be preserved. |
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
| Sidekiq.redis {|c| c.del('stat:processed') } | |
| and to reset failed jobs: | |
| Sidekiq.redis {|c| c.del('stat:failed') } | |
| bundle exec sidekiq -q high,5 default | |
| RAILS_ENV=production bundle exec sidekiq -d -L /home/deployer/apps/collector/shared/sidekiq.log -q high,5 default |
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
| gem build hola.gemspec |
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 'lib/my_gem' | |
| #http://stackoverflow.com/questions/4493114/developing-gems-and-testing | |
| #http://stackoverflow.com/questions/4487948/how-can-i-specify-a-local-gem-in-my-gemfile |
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 calculate_till | |
| self.cash_in_till = type.nil? ? cash_on_hand : | |
| send("calculate_#{type.gsub(/-/,"_")}") | |
| calculated_value | |
| end |
NewerOlder