I am setting up a RETS MLS program using phrets and just wondered what the heck the disable follow location means? - rets

I am setting up a RETS MLS program using phrets and just wondered what the heck the disable follow location means?
$config = new \PHRETS\Configuration;
$config->setLoginUrl('*****************');
$config->setUsername('****');
$config->setPassword('****');
$config->setUserAgent('****');
$config->setRetsVersion('1.7.2');
$config->setOption('disable_follow_location',false);
$config->setOption('use_post_method',true);
$rets = new \PHRETS\Session($config);

There was an old feature in PHP called "safe mode" which, when enabled, would complain if something was using cURL in a way where it would automatically follow server-given redirects. That option was added so that in instances where it wasn't needed (I've never seen it actually used by RETS servers, but it's defined as something RETS clients need to expect), it could be turned off to hide the warning. It should be safe to ignore nowadays with recent versions of PHP.
I'll likely remove that pretty soon just to clean it up.

Related

Set Away/Home Mode

Does the API expose the ability to set the mode to Away or Home?
I don’t see this listed in the API documentation. I think this functionality is important as it now only allows you to turn off your thermostats but also configure alerts via the mobile app (I have mine set to only send alerts for my NestCams when I’m away).
You can't set "away", but you can set the thermostat to either Eco or Off.
No. I also hope the old functionality of the Nest API's will be available on the new API. The motion/person per zone is also missing for example.
There's no way to explicitly set that in this new API. Google wants you to use their Home/Away Routines instead, though I don't think all of the old use cases are supported yet (or will be).
https://support.google.com/googlenest/answer/10071816

Trying to use 'ugly urls' with mediawiki install

So, I'm in a bit of a weird place. I have a local mediawiki install I've been trying to get running.
Installation went off without a hitch, however I cannot access the wiki when it uses the more normal URL ("localhost/mywiki/index.php/Main_Page"). However, it works fine when using the so-called 'ugly' URL ("localhost/mywiki/index.php?title=Main_Page").
So, with that in mind, I've been trying to set up my mediawiki (version 1.29) to use the "ugly URL"s via the "$wgArticlePath" setting. I've tried a number of different setups, including the following:
$wgArticlePath = "$wgScript?title=$1";
$wgArticlePath = "$wgScriptPath?title=$1";
$wgArticlePath = "$wgScriptPath/wgScript?title=$1";
But none of them will actually return what I need them to. If anyone has more experience with mediawiki, I'd appreciate the assist.
Try to set $wgUsePathInfo to false. Or set up a nice URL with the short URL builder.

Issues with Swashbuckle

I have a WebAPI service, written in ASP.NET (not Core), for which I am trying to generate documentation, in order to allow other devs to use it. I found Swashbuckle, and installed it. Then, since I also use OData for some of my services, I added Swashbuckle.OData. Then, I modified the CustomProvider setting in SwaggerConfig to use the ODataSwaggerProvider. I also set ResolveConflictingActions(apiDescriptions => apiDescriptions.First()) because I had a few Actions with the same URL path, differing only by query string (I'll need to address that later). So far so good.
Then, I tested it. I started my web app, then added "/swagger/" to then end. I got a message stating that it was loading the resource info. However, after several minutes, I got a browser error debug popup, stating "Error: Not enough storage is available to complete this operation." It asks if I want to debug, and if I do, it takes me to the debugger in IE (the browser I'm using). The only code in the stack is either from jquery-1-8-0-min-js or swagger-ui-min-js (this part confuses me, as there is no "swagger-ui-min-js" file in my project; I'm assuming it's embedded in the dll). There is no part of the stack trace that floats back up to my code, and all the code there is minified, so it's very difficult to debug.
However, I do know that it is at least partially working, as three of the controllers do show up in the resulting page after you close the error popup. You can navigate through them, and all the GETs, POSTs, PUTs, and DELETEs seem to be there, and you can test them.
Is it the case that whenever you navigate to the "/swagger/" url, Swagger hits all the URLs in the service, in order to generate the documentation? I'm wondering if maybe it is hitting an action that is taking a particularly long time to run, or possibly its generated documentation is taking too much disk space (I have plenty of space on my disk, but maybe it is referring to RAM?).
Anyway, even if that were not an issue, how can I get it to generate something, some kind of document file, that I can send off to someone? I see no new files added to my folders, so it would seem that it re-does the whole process every time you navigate to the swagger URL.
When I tried the Chrome browser, I no longer had the issue (I was using IE11 before). Not sure what the problem was, but this was the workaround.

magento: fast_backend vs slow_backend vs backend - What is going on here?

Heard some talk about this being something that can be set in apt/etc/local.xml but I didnt see any of it there by default.. Maybe you can add it?
Anyway. It was described to me that the fast_backend gets some of the magento stuff while the slow_backend get the other stuff and if fast_backend fails, then it will failover to slow_backend.
Where do I set these options?
What is stored in fast_backend?
What is stored in slow_backend?
What is the option "backend" for and what is stored there?
take a look at the local.xml.additional in the same folder hints on how to configure it properly.
also, http://www.fabrizio-branca.de/magento-caching-internals.html gives a good overview about the magento caches.

How can a bookmarklet access a Firefox extension (or vice versa)

I have written a Firefox extension that catches when a particular URL is entered and does some stuff. My main app launches Firefox with this URL. The URL contains sensitive information so I don't want it being stored in the history.
I'm concerned about the case where the extension is not installed. If its not installed and Firefox gets launched with the sensitive URL, it will get stored in history and there's nothing I can do about it. So my idea is to use a bookmarklet.
I will launch Firefox with "javascript:window.location.href='pleaseinstallthisplugin.html'; sensitiveinfo='blahblah'".
If the extension is not installed they will get redirected to a page that tells them to install it and the sensitive info won't get stored in the history. If the extension IS installed it will grab the information in the sensitiveinfo variable and do its thing.
My question is, can the bookmarklet call a method in the extension to pass the sensitive info (and if so, how) or can the extension catch when javascript is being called in the bookmarklet?
How can a bookmarklet and Firefox extension communicate?
p.s. The alternative means of getting around this situation would be for my main app to launch Firefox and communicate with the extension using sockets but I am loath to do that because I've run into too many issues over the years with users with crazy firewalls blocking socket communication. I'd like to do everything without sockets if possible.
As far as I know, bookmarklets can never access chrome files (extensions).
Bookmarklets are executed in the scope of the current document, which is almost always a content document. However, if you are passing it in via the command line, it seems to work:
/Applications/Namoroka.app/Contents/MacOS/firefox-bin javascript:alert\(Components\)
Accessing Components would throw if it was not allowed, but the alert displays the proper object.
You could use unsafeWindow to inject a global. You can add a mere property so that your bookmarklet only needs to detect whether the global is defined or not, but you should know that, as far as I know, there is no way to prohibit sites in a non-bookmarklet context from also sniffing for this same global (since it may be a privacy concern to some that sites can detect whether they are using the extension). I have confirmed in my own add-on which injects a global in a manner similar to that below that it does work in a bookmarklet as well as regular site context.
If you register an nsIObserver, e.g., where content-document-global-created is the topic, and then unwrap the subject, you can inject your global (see this if you need to inject something more sophisticated like an object with methods).
Here is some (untested) code which should do the trick:
var observerService = Cc['#mozilla.org/observer-service;1'].getService(Ci.nsIObserverService);
observerService.addObserver({observe: function (subject, topic, data) {
var unsafeWindow = XPCNativeWrapper.unwrap(subject);
unsafeWindow.myGlobal = true;
}}, 'content-document-global-created', false);
See this and this if you want an apparently easier way in an SDK add-on (not sure whether SDK postMessage communication would work as an alternative but with the apparently same concern that this would be exposed to non-bookmarklet contexts (i.e., regular websites) as well).

Resources