Skip to content

Instantly share code, notes, and snippets.

View mahesh-krishnakumar's full-sized avatar

Mahesh Krishna Kumar mahesh-krishnakumar

  • Ultrahuman
  • Bangalore
  • 08:10 (UTC +05:30)
  • X @maheshk_87
View GitHub Profile
module OmsOperations
class SendOrdersToCostcoService
include CostcoHelper
COSTCO_RETAILER_ID = 'Costco.com'.freeze
# TODO: Find a way to get the last uploaded order ID.
# Should we store the CSV files in S3 first, for debug logs.
def process
begin
@mahesh-krishnakumar
mahesh-krishnakumar / pf_merge_checklist.md
Last active November 12, 2020 10:30
Pupilfirst PR merge checklist
  • Added spec for the feature/bug.
  • Updated I18n files for relevant texts in UI
  • Updated developer and product docs if applicable
  • Check if new tables/columns added need to be handled in the following services: Users::DeleteAccountService, Courses::CloneService, Courses::DeleteService, Courses::DemoContentService, Schools::DeleteService
  • Check if changes in package components are published in npm
  • Added development seeds for new tables, if relevant.
@mahesh-krishnakumar
mahesh-krishnakumar / rails-jsonb-queries
Created June 28, 2020 05:22 — forked from mankind/rails-jsonb-queries
Rails-5 postgresql-9.6 jsonb queries
http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query
http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails
#payload: [{"kind"=>"person"}]
Segment.where("payload @> ?", [{kind: "person"}].to_json)
#data: {"interest"=>["music", "movies", "programming"]}
Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json)
Segment.where("data #>> '{interest, 1}' = 'movies' ")
Segment.where("jsonb_array_length(data->'interest') > 1")
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html