Zsh: Ctrl+C to delete current line without creating new prompt - zsh

So I really like ipython's feature where it deletes the current line when you press Ctrl+C without creating a new prompt below. Is it in any way possible to do this in Zsh? I have tried the obvious (bindkey -M [desired_mode] '^C' kill-whole-line) but it didn't seem to work, and elsewhere I found advice to not remap Ctrl+C, so I was wondering if anyone knows a solution to this problem. :-)

Related

Goland run config console is wrapping lines before the end

For some reason the Goland console has started adding a line wrap well before the end of the screen when I run a debug configuration:
This is not happening when run the same command in another terminal or IDE, and I can't find any docs on settings I might have tweaked to make this happen. How do I get it to stop wrapping the lines like this?
It is a known issue in GoLand. Feel free to follow GO-12814.
As a workaround, you can invoke Help | Find Action | Registry, find go.run.processes.with.pty and disable it.

Having a problem with build\nodes\runnodes

I've been trying to build a CordApp and I downloaded the template from GitHub. The code that I've written is available on the following link:
https://github.com/shanmukhipriya99/taskcordapp
When I'm trying to run gradlew.bat deployNodes in the cmd terminal, this is what I got:
[gradlew.bat deployNodes]
Then when I run build\nodes\runnodes in the cmd terminal, this is what I got:
[build\nodes\runnodes]
Then I have three other terminal windows opening-up, they load the Corda part, show some red text that says something about the developer mode and all the node terminals get closed automatically before I'm able to read the entire text.
Can someone please help me in figuring out where I'm wrong!?
Thanks in advance!
It looks like you have had successfully started the nodes all in one terminal. I am not entirely sure, if this is the only issue, but I have seen this issue before. This is caused by lack of permission of the Terminal.
I have seen it happened for both Windows and Unix/Macos users. To resolve it you might need to grant the permission to Terminal manually.
If it still does not work out, I would actually suggest the alternative quick fix that Ashutosh mentioned in comment. Open a new tab and go to the root folder of each nodecd /build/nodes/XXX, and start the node manually via java -jar corda.jar

Creating an executable R-file

I want to make an executable R-file (for automation purposes). Therefore I concluded the following tutorial.
After completion however nothing happens... Only the .Rexec file opening in RStudio (in stead of running it and showing me the pop up...
Any more people experienced this? Any clues to where to look to fix this?
The tutorial you gave is useful. However, it missed something.
After done all the things in that blog, you still need to do one more thing. Right click on the "test.Rexec" file and choose "open with" and then select "RScript". Maybe you need to find RScript in your system which is usually here:
C:\Program Files\R\R-3.2.1\bin\Rscript.exe
Remeber to check the "Always use the selected program to open this kind of file".
Next time, when you double click the "test.Rexec" file, evethying would be okay.
I found no need to create Rexec file.
I created .bat file and then set it up in Task Scheduler.
The .bat file opens up the Rscript.exe, as shown in prev answer above. The .bat file then points to the .R file, that I want to be executed.
For some time, I could not get it to work, but solution was to point to Rscript.exe as mentioned above. Then it will not open up in compiler.
Works fine for me.

What happens between sourcing ~/.zsh/env and sourcing ~/.zshrc?

I'm switching from gnu screen to tmux, and I'm observing a weird behaviour where my shell hangs when I create a new window in tmux. I can kill the hang and get to my shell if I hit CTRL-C, but I want to find out what's going wrong.
I've done some echo debugging of my zsh configuration and figured out that the hang happens after ~/.zsh/env is sourced (it doesn't hang w/in ~/.zsh/env, I've checked that), but before ~/.zshrc is sourced. I'm willing to dig further, but I'm not sure what happens between those two steps. Can anyone tell me, so I know where to look?
Ah-ha, it's /etc/zprofile that's causing the issue. I found out from man zsh the order of the sourced files. Thanks!

How do I get wkhtmltopdf running for a Drupal site on cPanel shared hosting?

First off, I will acknowledge that I am aware of another similar thread on the topic of wkhtmltopdf, but it was not similar enough to resolve my issue. Here's the other thread: wkhtmltopdf
Second, I will say that I have successfully used wkhtmltopdf with a Drupal site on a dedicated server that I run, where I installed the libX11 and used the most recent static version of wkhtmltopdf. That's on a CentOS 5 system and it runs nicely.
So, I have another hosting arrangement and I need to get the wkhtmltopdf to work, because it does the most amazing job producing bookmarked PDFs. The PDFs are beautiful.
The hosting is cPanel. I determined that it is on a server that has CentOS 5.5. It is not a problem to drop the static wkhtmltopdf in the print module's lib folder. However, I get the following message back in the Drupal admin status reports page (admin/reports/status).
It says,
"wkhtmltopdf library
The currently selected version of wkhtmltopdf () is not supported. Please update to a newer version."
I have obtained all of the needed .so files for CentOS 5, based on what jockie provided in his answer in the other StackOverflow thread.
Can someone knowledgeable confirm that his list was complete?
The idea of a shell script wrapper seems interesting and appears could be done for Drupal, if the naming of the shell script is called something like "wkhtmltopdf-wrapper.sh".
I have tried to use the shell script code that jockie provided, in a shell script. I did place all of the .so files in a sub-folder called "lib". I confess that I do not know what such things mean, in the script:
export HOME="$PWD"
Can someone interpret for me, what $PWD means?
export LD_LIBRARY_PATH="$PWD/lib/"
I understand that the script is going to get the .so files with that line, yes?
And can someone interpret the following line:
exec $# 2>/dev/null
What I am wondering is, where does the actual pdf get output? I did run the script. It did not throw any errors. However, I did not see a resulting PDF file.
Also, jockie's directions are not totally clear or defined enough. He says, "(some of them are symlinks)" under the list of .so files. Are such lines (in his list), the symlinks?:
lib/libX11.so.6 lib/libX11.so.6.2.0
Or am I mistaken? I was able to get all of them, so I don't know why they would be symlinks. The only thing is, that some of the versions are different. Do I need to delete the following files and make symlinks instead?:
lib/libX11.so.6
lib/libXau.so.6
lib/libxcb.so.1
lib/libXext.so.6
Should the shell script code be written differently, with Drupal in mind?
Thanks for reading and I hope someone can help!
...Finally, if anyone knows of a better solution, please share! Again, I appreciate the help!
...There does not seem to be a way, here on StackOverflow.com to notify jockie to check out this thread. I wish there was a way to write to them or notify them, so that they could clarify for them-self or contribute to this thread as well. If someone knows of a way, please let me know that too!

Resources