hubot coffee script - how to set and get brain into file - coffeescript

How do I save the robot brain into a file and load brain data from the file again?
I need it to keep brain persistence in case hubot crashes and want to use his last thoughts when getting it up again.

I have faced the same problem but this worked for me. In order to start redis-brain, you will have to install redis from your browser(same for Windows,Linux, etc,.). After downloading, go to command prompt and open it as an "Admin". In cmd go to Program Files and open Redis and run this "redis-server.exe". Now you have completed setup redis-brain for your project. Hope this would help you!

Related

Minecraft Server restart after action

I am trying to code a LoL plugin for my MC-server and I need everytime, to restart the server when the game ends. So if the last player dies or something the server needs to restart, to set everything on default. My problem is, I can't get the line of code that restarts the server. I hope you can help as fast as possible
what I would do is [assuming you are using spigot], go to your spigot.yml file and change the "restart script" line to whatever your start.bat/sh file is called. Then, when someone dies use Bukkit.getConsoleSender().dispatchCommand(Bukkit.getConsoleSender(), "restart");

How to remain running status of zopectl and plone?

Last week my lab's power outage occurred and the web server went out.
And after then, my webpage doesn't work anymore. My webpage is using plone and zope.
So I first went to the directory /Plone/zinstance/bin
typed ./instance
then did zopectl start
then I typed ./plonectl start.
But the problem is the following : everytime I start zopectl and plonectl, the daemon process soon died.
The command line is like this.
I don't know what is the problem and what should I do. Anyone who knows well about plone and zopectl please help me.
Try ./instance fg. If you have an error it will be displayed in the console.
(fg - means running it in the foreground)

unattended wim deployment backinfo

I have a script that deploys a WIM to a partition and makes it bootable and it uses an unattend.xml to configure the name and everything else. I include the BackInfo.exe with settings for it and when the OS boots up I have it run a logon script to initialize the OS for a bunch of stuff. I have tried in the script to run the BackInfo.exe, I have tried in the unattend.xml, I have tried adding a registry key into HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run, I have tried adding a scheduled task.
No matter what happens the background is always the default one and never set to the generated one from BackInfo. When I run the command manually it works perfectly. I for the life of me can't seem to get this working.
Any help would be very much appreciated!
So turns out I had placed the code into the FirstLogonCommands section which turns out wouldn't work, I changed it over to LogonCommands.
<LogonCommands>
<AsynchronousCommand wcm:action="add">
<CommandLine>%SystemDrive%\Applications\BackInfo\BackInfo.exe</CommandLine>
<Description>BgInfo</Description>
<Order>1</Order>
</AsynchronousCommand>
</LogonCommands>
Hopefully this can help someone else in the future and prevent them from wasting time trying to figure out other ways.

Package Manager Console wont inialize

I am trying to user the package manager console it will not get past Initializing PowerShell Host....
I try to open PowerShell directly and I get
I have had this before and eventually had to restore computer to prior date. I tried that and it changed nothing. Does anyone have any ideas?
UPDATE
Information under event viewer says
Windows PowerShell has started an IPC listening thread on process: 22300 in AppDomain: DefaultAppDomain.
I Restored computer again and this worked. I tried this once, it didn't work, but it did on third time of trying.
Clearing cache did the trick for me, no idea why though.

could not open session as Root

I came across this error that is apparently pretty common among Linux Systems.
"Too many files Open"
In my code I tried to set the Python open file limit to unlimited and it threw an error saying that I could not exceed the system limit.
import resource
try:
resource.setrlimit(resource.RLIMIT_NOFILE, (500,-1))
except Exception as err:
print err
pass
So...I Googled around a bit and followed this tutorial.
However, I set everything to 9999999 which I thought would be as close to unlimited as I could get. Now I cannot open a session as root on that machine. I can't login as root at all and am pretty much stuck. What can I do to get this machine working again? I need to be able to login as root! I am running Centos 6 and it's as up to date as possible.
Did you try turning it off and on?
If this doesn't help you can supply init=/bin/bash as kernel boot parameter to enter a root shell. Or boot from a live cd and revert your changes.
After performing an 'strace su -', I looked for the 'No such file or directory' error. When comparing the output, I found that some of those errors are ok, however, there were other files missing on my problem system that existed on a comparison system. Ultimately, it led me to a faulty line in /etc/pam.d/system-auth-ac referencing an invalid shared object.
So, my recommendation is to go through your /etc/pam.d config files and validate the existence of the shared object libraries, or, look in /var/log/secure and it should give some clue to missing shared objects as well.