Change Bigcouch hostname - hostname

Is there any elegant way to change the Bigcouch hostname? Bigcouch just automatically assumes it's name is bigcouch#FQDN so that is sprinkled through out all the databases you create on it. When you change the FQDN Bigcouch craps it's pants and you can't do anything.
I have tried to manually go through the 5986 admin port and change all the FQDN references which then appears to give me 5984 access and editing ability again. It's not documented at all so it's just a crude hack that may or may not work properly.
Perhaps there is some more elegant way? Seems kind of primitive to have to blow away a server and re-add it to a cluster in order to do this.

Related

Emacs SSH - Enforce read-only

Is there any possibility to connect to an SSH server using /ssh:user#server with read-only access, even if the account has write access? I need this to prevent accidental write.
Here is the function I use to connect:
(defun connect-b2b ()
(interactive)
(find-file-other-window "/ssh:user#server:/")
buffer-read-only)
(global-set-key (kbd "C-c C-d") 'connect-b2b)
Note that buffer-read-only does not help, neither does vc-toggle-read-only.
Update: Just to be clear what I want to achieve, I have an account with read+write access, however since this is a business critical server I wanted to prevent accidental changes. Unfortunately I cant change permissions on the user account itself, therefore I wanted to enforce this locally.
Third suggestion: Use sshfs to provide the remote filesystem locally, and mount it read-only, and then point Emacs at that.
That way you're not subject to all of the pitfalls of being able to run commands directly on the remote server as a user who has write-permissions.
If I've interpreted the question rightly, directory-local variables are a potential workaround. This would be overridden if there were dir-local configs nearer to the path in question, however, so YMMV.
(dir-locals-set-class-variables
'read-only
'((nil . ((buffer-read-only . t)))))
(dir-locals-set-directory-class "/ssh:user#server:/" 'read-only)
I'm still able to for example touch a file in the specified directory.
That's got nothing to do with Emacs. You're asking for Emacs to employ OS-level access controls, which it can't do, because it's not the OS. In your case it's not even running on the same machine.
You need to create a new user with more limited access, and connect as that user instead.

Where is Prestashops Maintanence mode setting stored?

I'm having an issue with my website at the moment and I wish to enable maintenance mode. I'm unable to login but I do have access to the database. Which table is this located in?
Also, Prestashop.com is down for me including the forums so I can't look there... My web host is also unsure...
I know this isn't really a proper thing to ask but I'm unsure where else I could ask?
It's in the table ps_configuration under the name PS_SHOP_ENABLE

Can I use an API such as chef to automatically create, name and set passwords to multiple servers?

I am new to this so forgive me for not understanding the lingo.
I have been using rackspace cloud control panel to build multiple virtual servers, i use them for maybe a couple of hours then i delete them. I need these servers to all have specific and unique names such as: "server1, server2, server3, etc." I also need them to have a specific password unlike the randomly generated password that is assigned by default.
I have been creating each individual server manually (based on an image that's set up) then I have to go back and reset the password andreboot all of them. Doing each one manually is a bit time consuming and I'm sure there is an easier way. Please help me figure this out.
I've been doing some searching but I haven't found anything too relevant to my problem on top of that I'm not too familiar with programming and such.
Basically what I'm looking to do is automatically create these servers with their appropriate names and passwords already built in from the start. I'm not sure if some sort of "API" is the answer, or if there's some sort of script that can be written, or both.
Any assistance is much appreciated.
thanks,
Chris

Key mapping for putty or putty alternative

at my work we're trying to find a replacement for an old telnet client that we use to connect to an SCO Unix server running an old program. I have found that I can almost get putty to do everything required - setting it to SCO function keys lets me use the F1 to F12 correctly and setting the translation character set to CP437 draws all the lines correctly.
The problem is that the program we use on the server pretty much requires the use of custom key mapping. That is we need to be able to map the home key to ";$", the end key to "exit^M", the F-10 key to ";}" etc. Putty doesn't allow custom mapping. We've tried to edit the source code of putty to change its behaviour, but had no luck.
Does anyone know if there is a modified version of putty somewhere that allows key binding? Or another free terminal program that does? Or instructions for what to change in the putty source code? If we can't find a solution we're probably going to end up buying ZOC, but we'd rather not if we can find an open alternative.
Thanks a lot,
Alex
Never mind, in the end we were able to modify the Putty source code as required to add the custom keys.

Managing ajax Couchdb calls and IE's (hta) agressive cache

I'm having a quite annoying problem, and came up with a quite ugly hack to make it work.
I develop an Hta application using a CouchDB database (for internal company use). The problem is there seems to be some very aggressive caching of the database queries, and it's been hard to come up with solutions.
So the updated data in the database just won't come up in the browser, who still has the previous request results in his cache, until the entire app is started anew.
Oh, and CouchDB (or it's mochiweb server) doesn't allow unknown GET variables, so the usual solution of appending some sort of timestamp just won't work.
I have found some sort of solution, but it's damn ugly. Solutions are:
Only open documents with latest revision number (easy and nice, won't work on views)
Use apache as forward proxy listening to 200+ ports, and select one at random on each read query. (that's the ugly one).
Hta accepts ajax calls to other ports (maybe even on other domains, strange behaviour), so it works nicely, I just have a 1/200 chance that new data won't come up, but that's still better then 1/1, I can live with that.
So what I'm asking is, is there a better solution to this ? Can I hack in to the mochiweb server to modify cache headers (and hope they're not going to be ignored) ? Is there a special unknown "throwaway" key I could use in the url's to append some random string ? Or is there a way to tell Hta not to cache anything (from within the app, this is supposed to work on hundreds of computers) ?
it's still ugly but slightly less ugly than your current apache setup but Can't you use an apache rewrite rule to allow you to set an arbitrary no_cache attribute on the url? apache can throw it away so couchdb won't see it.