How to disable strongloop's API explorer swagger console - configuration

I'd like to disable the strongloop api explorer (pref as noted in docs) - not clear if this is a bug or documentation issue.
Setting or replacing component config or using component-config.production as noted in the docs fails and generates an critical error / crashing express.
// Original
{
"loopback-component-explorer": {
"mountPath": "/explorer"
}
}
// changes made to disable
{
"loopback-component-explorer": false
}
Docs:
https://docs.strongloop.com/display/APIC/Preparing+for+deployment#Preparingfordeployment-DisablingAPIExplorer

Remove the loopback-component-explorer entry from your component-config.json file entirely.

You can remove only 'loopback-component-explorer' part from 'component-config.json' and keep the empty object, where the code will not get crashed.
Original code:
{
"loopback-component-explorer": {
"mountPath": "/explorer"
}
}
Updated:
{
}
Also can turn off stack traces, more info here

Related

Insatgram ?__a=1 Php user data get doesn't work anymore

In the past when I used to send requests to get user's data in JSON format I just did:
https://www.instagram.com/user_name/?__a=1
and it would return me all the data and the first 12 posts(with their picture's link)
but now it is just returning:
for (;;);
{
"__ar":1,
"error":1357004,
"errorSummary":"Sorry, something went wrong",
"errorDescription":"Please try closing and re-opening your browser window.",
"payload":null,
"hsrp":
{
"hblp":
{
"consistency":
{
"rev":1005869239
}
}
},
"lid":"7122014805466860625"
}
for some weird reason, and my app is not working anymore because of that, does someone have an idea how to fix that?

Why updated forge viewer's model browser isolate the items instead of select?

In the older version(7.1.*) of forge viewer the Model browser select the item and focus the selected item.
But in the latest version(7.*.*) it isolate the item(s).
Is there any way or settings to get back to the older functionality in the latest version?
You can change the behavior by specifying options.docStructureConfig on ModelStructurePanel.
Pls. check below blog post and query on stack overflow which answering for this topics.
https://forge.autodesk.com/blog/customizing-modelstructurepanel-behavior-forge-viewer
Prevent zoom in Forge viewer when clicking in Model Browser
As described in the blog post, you can change the behavior by creating custom ModelStructure Panel on Autodesk.Viewing.OBJECT_TREE_CREATED_EVENT handler or you can specify the option in its constructor.
You also can specify the option in GuiViewer3D constrictor like below.
var options = {
docStructureConfig: {
click: {
onObject: ["selectOnly"] //instead of toggleOverlayedSelection
},
clickShift: {
onObject: ["isolate"] //instead of toggleMultipleOverlayedSelection
},
clickCtrl: {
onObject: ["selectToggle"] //instead of toggleMultipleOverlayedSelection
}
}
}
viewer3d = new Autodesk.Viewing.GuiViewer3D(document.getElementById('forgeViewer3d'), options);

PlatformIO Possible key upload_flags & upload_command string option

I work with STM32F429ZI and PlatformIO and i need to upload firmware to specific address like 0x08020000 for example. And I can't find in docs on platformio which key for upload_flags I can use for it, or how I can modify upload_command for it. Thanks.
Right solution is add mbed_app.json to your project root with:
{
"target_overrides": {
"*": {
"target.mbed_app_start" : "0x08020000",
"target.mbed_app_size" : "0x000A0000"
}
}
}
https://os.mbed.com/docs/mbed-os/v5.15/reference/bootloader-configuration.html
This parameters expand to:
MEMORY
{
FLASH (rx) : ORIGIN = 0x8020000, LENGTH = 0xa0000
...
}
on your .ld script and you don't need to change upload_flags and upload_command.

Remove cookie policy popup created by ngx-cookieconsent

How can I remove the small "Cookie policy" window?
I am using latest version of ngx-cookieconsent with Angular 7.2
i forced to close it by:
this.ccService.close(false);
or to hide by this.ccService.fadeOut();
since 'revokable': false option didnt work.
I'm a bit late for this answer but had the same issue today and I found some workaround.
this.statusChangeSubscription = this.ccService.statusChange$.subscribe(
(event: NgcStatusChangeEvent) => {
if (event.status === 'allow') {
this.ccService.close(false); // Hide revoke button after accepting cookies
}
});
Below this or at the end of ngOnInit() I added this:
if (this.ccService.hasConsented()) {
this.ccService.destroy();
}
Code above check if you get consent and if yes it will destroy popup instance.
An alternative solution is to add the following in the app.component.scss:
/* Hide ng cookies consent revoke button */
::ng-deep .cc-revoke {
display: none;
}
Have you try the this.ccService.getConfig().autoOpen=false ?
After saving cookie, i set it to false.

FullCalendar-Scheduler Google Calendars ResourceIDs Query

Reference: FullCalendar 3.9.0, FullCalendar-Scheduler 1.9.4
Can anyone confirm whether or not it is possible to group Google calendar events by resource? Adding a resourceId parameter to a calendar source as follows:
var myCalSrc = {
id: 1,
googleCalendarId: '<myCalSrcURL>',
color: '<myCalSrcColor>',
className: '<myCalSrc-events>'
};
results in a blank display. The following note in the FullCalendar-Scheduler gcal.html file located in the demos directory states:
/*
NOTE: unfortunately, Scheduler doesn't know how to associated events from
Google Calendar with resources, so if you specify a resource list,
nothing will show up :( Working on some solutions.
*/
However, the following threads appear to suggest there may have been a fix for this:
GitHub - Add ResourceId Parameter to gcal.js (fix supplied)
GitHub - Specify resourceId in Event Source settings
However, checking the gcal.js file reveals the fix has not been added to that file.
Is it possible to manually assign a resourceId to each of the Google Calendar feeds in order to replicate the Resources and Timeline view indicated by the FullCalendar Timeline View documentation?
Any guidance would be greatly appreciated.
As per the issue in your second GitHub link (which your first one was merged with), https://github.com/fullcalendar/fullcalendar-scheduler/issues/124, the fix you mentioned is still awaiting testing (as of 11 Mar 2018). So if you're patient it will likely be added to a future release, assuming it passes the tests. In the meantime, here is a potential workaround:
In fullCalendar it's possible to define a separate eventDataTransform for every event source.
Therefore I think you should be able to use this to set a resource ID for each event depending on the Google Calendar it came from:
eventSources: [
{
googleCalendarId: 'abc#group.calendar.google.com',
color: 'blue',
eventDataTransform: function(event) {
event.resourceId = 1;
return event;
}
},
{
googleCalendarId: 'def#group.calendar.google.com',
color: 'green',
eventDataTransform: function(event) {
event.resourceId = 2;
return event;
}
},
{
googleCalendarId: 'ghi#group.calendar.google.com',
color: 'red' ,
eventDataTransform: function(event) {
event.resourceId = 3;
return event;
}
}
]
I'm not able to test this right now but it looks like it should work. Hopefully this will take place before it's rendered on the calendar and needs to belong to a resource.