Skip to content

Instantly share code, notes, and snippets.

View manojbecs's full-sized avatar

Manoj manojbecs

  • Multunus Software Pvt. Ltd.
  • Bangalore, India
View GitHub Profile
/* For single clinic custom website */
{
"title": "JointMan",
"position": "3",
"websites": [
{
"title": "",
"url": "https://www.t3treattotarget.com/",
"showZoomControls": false,
"desktopVersion": false
# All devices with at least one heartbeat
mp_with_last_seen = {}
MediaPlayer.find_in_batches(:batch_size => 100) do |mps|
mps.each do |mp|
hb = MediaPlayerHeartbeat.where(:client_id => mp.client_id).last
mp_with_last_seen[mp.name] = hb.created_at unless hb.blank?
end
end
CSV.open("data.csv", "wb") {|csv| mp_with_last_seen.to_a.each {|elem| csv << elem} }
{
"sponsor_ads": [
{
"type": "flash",
"sponsor": "Pradaxa",
"newsletter_available": false,
"conditions": [
"Heart Health",
"Heart Health 101",
"Atrial Fibrillation"
[
{
"title" : "Diabetes Basics",
"type" : "sub-conditions",
"sub_conditions": [
{
title: "A1C",
videos:[
{
name:"",
@manojbecs
manojbecs / gist:7590352
Last active December 29, 2015 00:59
Default weekly clinic hours
{
"Monday": {
"wake_up": ["7:00"],
"sleep":["17:00"]
},
"Tuesday" : {
"wake_up": ["7:00"],
"sleep":["17:00"]
},
"Wednesday" : {
{
flash_ads: [
{
sponsor_name: "Xeljanz",
condition: ["RA"],
source_type: "HTML",
banner_source_path: "xeljanz/banner/index.html",
box_source_path: "xeljanz/box/index.html",
sponsor_website_URL: "http://www.xeljanz.com/oral-medication?src_code=XELW10027436"
},
{
"Monday": {
"wake_up": ["7:00"],
"sleep":["19:00"]
},
"Tuesday" : {
"wake_up": ["7:00"],
"sleep":["19:00"]
},
"Wednesday" : {
{
"vacations" : [
"28-Nov-2013", "24-Dec-2013", "25-Dec-2013"
],
"override_days": [
"30-Nov-2013" : {
"sleep" : ["12:00", "17:00"],
"wake_up" : ["9:00", "13:00"]
},
"1-Dec-2013" : {
@manojbecs
manojbecs / 5690_random_unmute_cmhlog
Created November 6, 2013 17:17
This is a snapshot of log file when the device is offline. I missed the log for the bug. I took the latest file(~58MB) at 10:22AM assuming this will have the logs for the bug which occurred at 10:15AM. So we lost the logs in less than 10mins! Is there a way to avoid too many retries by websocket when device is offline? Just curious. This makes t…
11-05 10:21:22.538 D/cmh-communication-service(23534): DISCONNECTED
11-05 10:21:22.538 D/cmh-communication-service(23534): Trying to re connect...
11-05 10:21:22.538 D/cmh-communication-service(23534): CONNECTING
11-05 10:21:22.548 D/cmh-communication-service(23534): errorAn exception was thrown by the websocket
11-05 10:21:22.548 D/cmh-communication-service(23534): DISCONNECTED
11-05 10:21:22.548 D/cmh-communication-service(23534): Trying to re connect...
11-05 10:21:22.548 D/cmh-communication-service(23534): CONNECTING
11-05 10:21:22.548 D/cmh-communication-service(23534): errorAn exception was thrown by the websocket
11-05 10:21:22.548 D/cmh-communication-service(23534): DISCONNECTED
11-05 10:21:22.548 D/cmh-communication-service(23534): Trying to re connect...