Ember-cli: Stop or restart server - ember.js

Is there a quick way to stop or restart the server in ember-cli? Specially, when you've hit an error and need to restart it. Currently, I just close the window and reopen it, but that gets tedious when I'm making large changes to my Brocfile.js and such. Thanks.

I think it's important to note that This has nothing to do with ember.js or ember CLI. This is an issue with your terminal.
control + C
will terminate the current process in your terminal shell.
If it doesn't, then you should be checking your OS, or the type of terminal you are using.

Related

Correct way to close down RabbitMQ and Celery?

I'm using Django to call a Selenium script through Celery and RabbitMQ as a message broker.
The problem I'm having is often changes I make to my Selenium script aren't actually changing anything when I rerun my Django server. It sounds weird but I feel like something is still using my old code, not the one with the changes I make.
My guess is that this is something to do with RabbitMQ being kept running while I make changes to my Selenium script? Do I need to 'refresh' it somehow each time I make changes or re-start the process?
Also, I just ctrl+C to close everything when I'm finished, is there a 'proper' way to close down each time?

How to change Mongoid db details in Rails without having to restart the machine

Ok, I got a problem which seems very odd to me. Whenever I change db settings in mongoid.yml file, the changes won't be reflected (like doing a rails c and executing some code like Model.count) until I restart my computer.
Is that a normal behaviour?
In my experience, this kind of problem is often caused by application preloader (like spring) bugging out and not properly reloading changes in application code/config. In case of spring, it is often sufficient to stop it.
spring stop
BUT I've had a few cases where spring would hang up and refuse to stop. In which case I kill it forcefully
killall -9 -m spring
(kill every process with "spring" in its name)

Calabash how to speed up execution time

I have a Android device connected to my PC.
Running a calabash test I use the following command:
calabash-android run <NAME>.apk features/<NAME>.feature
Now before running a feature Calabash always uploads the application again witch takes time.
How can I disable this?
Any help would be appreciated!
Thank you!
You can control the reinstallation of the app using the hooks file. This contains the cucumber hooks for before and after scenario. If you didn't make the hooks file that you are running then it's probably one from a sample project.
The bit you're looking for is the 'reinstall_apps' command. If you remove it completely then your app won't ever be reinstalled, which can be a bad thing as it's sometimes necessary to reset the app completely. The way I handle it is to tag the features where I do want the app reinstalled with #reinstall_app and then
Before do |scenario|
puts "Starting scenario - #{scenario.name}"
reinstall_app if scenario.source_tag_names.include?('#reinstall_app'))
...
end

Qt Run an External Executable and Stop Running the Current

I'm trying to make an updater for an Application I've been developing for a few weeks. So lets say I have my app, which is "App.exe" and I download the updater from my web server, which is "Update.exe".
So in "App.exe", I will start downloading "Update.exe" from my web server. Once it is finished, I need to execute "Update.exe" from "App.exe" and then have "App.exe" close itself so that "Update.exe" can replace the old "App.exe" with the new one. Once it is replaced, "Update.exe" will need to run the new "App.exe" and then close itself.
Now, I'm not even sure if it's possible to fully close an app while leaving the externally executed app running and being able to delete the original executable, but it seems like one of the easiest methods to creating an application updater.
If this is possible, can someone show me an example or give me a link to an app opening another and closing itself leaving the other running? If not, is there a way similar to this that could create a basic updater?

Debugger in python for Google App Engine and Django

I am having a problem that has baffled me for over a week. I have a project that is written in python with Django on Google App Engine. The project has a login page and when I run the application in Google App Engine or from the command line using dev_server.py c:\project, it works fine. When I try to run the application through a debugger like Wing or Pycharm, I cannot get past the login page. After trying to login, it takes me back to the login screen again. When I look at the logs, it shows a 302 (redirect) in the debugger but normally it shows a 200 (OK). Could someone explain why this would be happening?
Thanks
-Dimitry
This isn't really a great answer since I don't know much about Wing or Pycharm. But dev_appserver reroutes stdin and stdout to the WSGI handler. If you hit a breakpoint set by pdb.set_trace(), the breakpoint usually drops you to a shell that uses stdin/stdout, but with dev_appserver, you'll see the debugger shell piped to your HTTP, and there's no input available.
I'm not sure how Wing/Pycharm handle this. Pydev with eclipse works with dev_appserver, but that might be because of the GAE eclipse plugin.
I find myself often embedding breakpoints in my code and debugging manually at the shell, mostly because it runs way faster than in the pydev debugger. I do this be rerouting stdin/stdout back to the terminal when I hit a breakpoint. http://eatdev.tumblr.com/post/12076034867/using-pdb-on-app-engine
I'm on a linux environment. I did work with the GAE app launcher on Windows for a little bit, but not recently. I think I recall the app launcher hiding the original terminal that launches dev_appserver, so you might have to launch dev_appserver from the command prompt for this to work. I suspect you may need similar hacks if Wing or Pycharm use pdb underneath.
After a week of racking my brain, I finally figured out the problem. The gaesessions code was the culprit. We put DEFAULT_LIFETIME = datetime.timedelta(hours=1) and originally it was DEFAULT_LIFETIME = datetime.timedelta(days=7). Not sure why running it through any debugger such as wing or pycharm would prevent the browser from getting a session. The interesting thing is the code change with hours=1 works fine on linux with wing debugger. Very Strange!