Chrome Setting Overrides not working on mac - macos

I have wrote simple search extension. It works fine on Windows but does not work very well on Mac. Extension sets newTab page, home page and default search provider. But on Mac search provider is not changed (I mean when I type in url field, omnibox), it is still google.
Here is the manifest:
{
"name" : "Example",
"short_name" : "example",
"manifest_version" : 2,
"version" : "2.6.1.0",
"description" : "Example Extension Description",
"chrome_settings_overrides" : {
"homepage" : "http://example.com/",
"search_provider" : {
"name": "Example Search Name",
"is_default" : true,
"encoding" : "UTF-8",
"favicon_url": "http://example.com/favicon.png",
"keyword" : "keyword.example.com",
"search_url" : "http://example.com/?q={searchTerms}&gid=SDD316",
"suggest_url" : "http://example.com/suggest.php?q={searchTerms}&gid=SDD316"
},
"startup_pages" : ["http://example.com"]
},
"chrome_url_overrides" : {
"newtab" : "html/newTab.html"
},
"icons" : {
"128" : "icon128.png",
"16" : "icon16.png",
"48" : "icon48.png"
},
"browser_action": {
"default_icon": "w.png",
"default_title": "Example Search",
"default_popup": "html/popup.html"
},
"background" : {
"scripts" : ["js/jquery-3.0.0.min.js", "js/background.js"]
},
"permissions" : ["storage", "http://*/*", "https://*/*", "unlimitedStorage", "chrome://favicon/*", "webRequest", "webRequestBlocking" ,"cookies", "*://*.test.com/*"],
"content_scripts": [
{
"js": [
"js/start.js"
],
"matches": [
"http://example.com/*"
],
"all_frames": false,
"run_at": "document_end"
}]
}
Wouldn't chrome_settings_overrides.search_provider change search in omnibox?

Settings Overrides is currently available in Windows and Mac, Mac in Chrome 56 and later. No Linux as of yet.
Chrome might be the only browser currently allowing Settings Overrides at some level.
Trivia: However general settings overriding (customization (for the user itself own client)) requires more serious security tuning and pruning by core Chromium.
General about browsers: Currently browsers are on fast dev cycle - Mozilla/Firefox coming along with Chrome, Opera, Vivaldi and Safari has really spiced up browser dev.
Settings Overrides soon then? I'm afraid that's a no. There's so many things happening atm.

Quoting the docs:
The API is available only on Windows.

Related

AppointmentType resource

I need to return AppointmentTypes as a FHIR resource. Unfortunately, I couldn't find it as an official FHIR resource format.
My best guess would be to create a Basic resource, like this:
{
"resourceType": "Basic",
"id" : "id-of-appointment-type",
"identifier" : [
{
"use" : "secondary",
"system" : "http://myUrl/myIdentifier",
"value" : "7"
}
],
"code" : {
"coding": [
{
"system": "http://myUrl/appointment-type",
"code": "appointment-type"
}
]
},
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">AppointmentType</div>"
},
"extension": [
{
"url": "http://myUrl/appointment-type-name",
"valueString": "New Patient"
},
{
"url": "http://myUrl/appointment-type-availability",
"valueBoolean": true
}
],
"meta" : {
"lastUpdated" : "2020-05-27T00:00:00.000Z"
}
}
Would this be the right way to create the AppointmentType resource?
I don't see any obvious issues, but did you evaluate using CodeSystem? You can define properties on CodeSystem codes which would be able to distinguish available from non-available appointment types - and that would work better with Appointment, where 'type' is expected to be a code.

Is there a way to implement the search provider override in a Firefox Web Extension?

I'm trying to migrate some Chrome extensions to Firefox. One of them uses the following code in the manifest.json file for chrome:
"chrome_settings_overrides" : {
"search_provider" : {
"alternate_urls" : [],
"encoding" : "UTF-8",
"favicon_url" : "",
"image_url" : "",
"image_url_post_params" : "",
"instant_url" : "",
"instant_url_post_params" : "",
"is_default" : true,
"keyword" : "",
"name" : "",
"search_url" : "",
"search_url_post_params" : "",
"suggest_url" : "",
"suggest_url_post_params" : ""
}
},
I can't seem to find a similar setting for Firefox in their documentation. Does anyone know if there is such a thing for Firefox?
It seems that this will be implemented but the developers are still undecided as to how.
https://bugzilla.mozilla.org/show_bug.cgi?id=1301315

FHIR complex extension

How can I add an extension that has multiple fields ?
For example if I have a extension related to visit motives that is structured like this in my application :
"visit_motive":
{
"id": "1",
"label": "Visit motive name",
"color": "#000000",
"duration": 5
}
I have something like this for the moment :
"extension": [
{
"url": "https://api.test.com/fhir/StructureDefinition/schedule-visit_motives",
"valueIdentifier": "visit_motive1_id",
"valueString" : "visit motive name",
"valueString" : "#000",
"valueInteger" : 5,
},
{
"url": "https://api.test.com/fhir/StructureDefinition/schedule-visit_motives",
"valueIdentifier": "visit_motive2_id",
"valueString" : "visit motive name 2",
"valueString" : "#111",
"valueInteger" : 10,
}
]
But I'm pretty sure it is not correct since I can't name the fields since I have to precise value[x] each time.
How can I do it ?
You would do that with a complex extension, which is basically an extension containing extensions. You can see more information about extensions in the spec. Scroll down a bit for the complex one. Or view an example of the structure of a complex extension here.
The use of your extension would look something like this:
"extension" : [{
"url" : "https://api.test.com/fhir/StructureDefinition/schedule-visit_motives",
"extension" : [{
"url" : "id",
"valueIdentifier": "visit_motive1_id"
}, {
"url" : "label",
"valueString" : "visit motive name"
}, {
"url" : "color",
"valueString" : "#000"
}, {
"url" : "duration",
"valueInteger" : 5,
}]
}]

provision ec2 in autoscaling group with ansible unsing cloud formation stack

I created autoscaling group which launch EC2 which has ELB. My question is how to provision those EC2 instances with ansible?
Before I used CNAME, but now I cant get instance dns. Please correct me if I wrong.
Should I use dynamic inventory or are there any other options?
My cloud formation template below:
```
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Template create autoscaling group",
"Parameters": {
"devKeyPair": {
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type": "AWS::EC2::KeyPair::KeyName",
"Default" : "dev-key"
}
},
"Resources" : {
"LaunchConfig" : {
"Type" : "AWS::AutoScaling::LaunchConfiguration",
"Properties" : {
"KeyName" : { "Ref": "devKeyPair" },
"ImageId" : "ami-1effc703",
"UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
"#!/bin/bash\n", "\n", " echo 'Installing Git'\n"," yum --nogpgcheck -y install wget\n""] ]}},
"InstanceType" : "t2.small",
"BlockDeviceMappings" : [
{
"DeviceName" : "/dev/sda1",
"Ebs" : {
"VolumeSize" : "10",
"VolumeType" : "gp2",
"DeleteOnTermination" : "true"
}
}
]
}
},
"BackendGroup" : {
"Type" : "AWS::AutoScaling::AutoScalingGroup",
"Properties" : {
"AvailabilityZones" : ["eu-central-1a"],
"MinSize" : "1",
"MaxSize" : "1",
"LaunchConfigurationName" : { "Ref" : "LaunchConfig" },
"LoadBalancerNames" : [ { "Ref" : "ElasticLoadBalancer" } ],
"Tags": [
{
"ResourceType": "auto-scaling-group",
"ResourceId": "bas-auto",
"Value": "bas-dev",
"Key": "Name",
"PropagateAtLaunch" : "true"
}
]
}
},
"ElasticLoadBalancer": {
"Type": "AWS::ElasticLoadBalancing::LoadBalancer",
"Properties": {
"AvailabilityZones": ["eu-central-1a"],
"Listeners": [ {
"LoadBalancerPort": "80",
"InstancePort": "80",
"Protocol": "HTTP"
} ]
}
},
"BackendDNS" : {
"Type" : "AWS::Route53::RecordSetGroup",
"Properties" : {
"HostedZoneName" : "example.com.",
"Comment" : "Targered to Bas instance",
"RecordSets" : [{
"Name" : "bas-dev.example.com.",
"Type" : "CNAME",
"TTL" : "300",
"ResourceRecords" : [
{
"Fn::GetAtt": [ "ElasticLoadBalancer", "DNSName" ]
}
]
}]
}
},
}
}
```
Another solution would be to provision your VM before starting the new instance. I.e. make sure that the image you're starting the ASG instances from is already provisioned.
One way to do this is to use something like packer.io to create a new AMI using Ansible as your provisioner. Then you can simply pass this new AMI ID into the ImageId attribute of the LaunchConfiguration.
Another approach could involve using the User Data to "phone home" and tell you the public IP address the instance has acquired.
The best solution for me was install Ansible Tower with a free license, the use user_data: properties ansible have an example here. https://www.ansible.com/blog/autoscaling-infrastructures
But is necessary build a first base image because if you NOT do this extend all provisioning time delay.
You can use Opswork with Cloudformation in order to run Ansible whenever a new instance is added to the Autoscaling group.
Though Opswork uses Chef but you can use this custom cookbook https://github.com/deepakagg/ansible-opsworks which will run desired playbook.

Disable all breakpoints in RStudio

Is there a a way to disable all breakpoints in RStudio? I have looked at the RStudio documentation as well as done google searches but couldn't find a way.
I was curious too, especially wanted to have an overview of breakpoints.
I ran grep in my project folder and this is what I found:
At first, with RStudio opened, the breakpoints don't show up, they're probably somewhere in memory:
$ grep -inIEr "breakpoint" .
./.Rproj.user/1C48145B/pcs/debug-breakpoints.pper:2: "debugBreakpointsState" : {
./.Rproj.user/1C48145B/pcs/debug-breakpoints.pper:3: "breakpoints" : [
grep: ./.Rproj.user/1C48145B/sources/s-8EAA4F36/lock_file: Device or resource busy
Then when we close RStudio, it seems they're written to a file called debug-breakpoints.pper
$ grep -inIEr "breakpoint" .
./.Rproj.user/1C48145B/pcs/debug-breakpoints.pper:2: "debugBreakpointsState" : {
./.Rproj.user/1C48145B/pcs/debug-breakpoints.pper:3: "breakpoints" : [
./.Rproj.user/1C48145B/pcs/debug-breakpoints.pper:10: "is_package_breakpoint" : false,
./.Rproj.user/1C48145B/pcs/debug-breakpoints.pper:25: "is_package_breakpoint" : false,
./.Rproj.user/1C48145B/pcs/find-in-files.pper:7: "query" : "breakpoint",
The file can be found at ./.Rproj.user/1C4***5B/pcs/debug-breakpoints.pper and looks like this:
{
"debugBreakpointsState" : {
"breakpoints" : [
{
"editor_line_number" : 4,
"editor_state" : 1,
"function_name" : "toplevel",
"function_steps" : "",
"id" : 2,
"is_package_breakpoint" : false,
"is_pending_debug_completion" : false,
"line_number" : 4,
"needs_updated_steps" : false,
"package_name" : "",
"path" : "C:/Users/path/to/project/analysis_tab.R",
"state" : 1,
"type" : 1
},
{
"editor_line_number" : 193,
"editor_state" : 1,
"function_name" : "toplevel",
"function_steps" : "",
"id" : 3,
"is_package_breakpoint" : false,
"is_pending_debug_completion" : false,
"line_number" : 193,
"needs_updated_steps" : false,
"package_name" : "",
"path" : "C:/Users/path/to/project/analysis_tab.R",
"state" : 1,
"type" : 1
}
]
}
}
Manually editing this file when RStudio is closed lets us manage our breakpoints. (With RStudio opened, changes made to this file would eventually be overwritten).
It's right there under the Debug menu:
Default keyboard shortcut (on my system): Ctrl+Shift+F9

Resources