I have a question that can we call or run files of our package inside ros through a webpage. In other word, can we perform rosrun or roslaunch from an html page?
One way to do what you want is to integrate a shell to a website. There are some projects dealing with such use cases. A greate solution is shellinabox. It is open source, easy to use and install. With the shell integrated to a website you are able to perform all shell commands you need to control ROS.
You can find a nice tutorial how to install and use shellinabox at Tecmint.
Related
I'm trying to figure out how to properly setup an ejabberd project that allows for easy compilation of custom beam files- so far, we've been using an existing project that is cumbersome to manage, and uses erlide as the IDE.
I would like to set up the project in a way that I can use a more helpful IDE like vscode, and somehow streamline the compiling and copying of the beam files and updating the module on the server.
Writing code in Elixir is fine as well- I just want the project to be set up in a way that is dev friendly.
Apologies if the question is too broad, but I'm not exactly sure how else to best phrase it. If you feel like I'm missing something in my current flow, please let me know, as I've basically inherited this project. If there are any clarifications required, let me know as well.
Thanks.
easy compilation of custom beam files
somehow streamline the compiling and copying of the beam files and updating the module on the server.
If the task is about compiling and loading additional modules, a running ejabberd node can compile, load and start additional modules in runtime, see
https://docs.ejabberd.im/developer/extending-ejabberd/modules/#ejabberd-contrib
Usually the modules come from
https://github.com/processone/ejabberd-contrib
but you can tell ejabberd to download other modules from other git repositories, or you can copy modules source code and tell ejabberd to install them. And those modules can be written in Erlang or Elixir. Full example: https://docs.ejabberd.im/developer/extending-ejabberd/elixir/#elixir-module-in-ejabberd-contrib
Basically:
you write the module in your development machine, test it...
when happy with the source code, copy mod_whatever.erl to the production machine, $HOME/.ejabberd-modules/sources/mod_whatever as explained in the example mentioned earlier
run ejabberdctl module_install mod_whatever
In step 2, instead of copying the source code yourself, you can have a git repository just for your module, tell ejabberd the module's git URL, similarly to https://github.com/processone/ejabberd-contrib/tree/master/extra
BTW, for step 3, starting in ejabberd 22.10, there's a page in ejabberd webadmin to install and uninstall those modules (copying the files requires manual administration of course).
I would like to set up the project in a way that I can use a more helpful IDE like vscode
What a coincidence, these days I'm playing with VSCode variants (VSCode, VSCodium, Coder's code-server and Github Codespaces) and how to develop ejabberd using them. This is useful for step 1 that I mentioned earlier (write module and test it). If you are interested in ejabberd + VSCode, tell me.
I am trying to run the github linguist ruby verision, It runs on my computer, I am using visual studio. If i run the github-linguist it does give me the stats of percentage and type of language my repository have that is on local system. ( using terminal commands )
OutPut running Linguist using terminal visual code
Goal: To write a scripts in ruby that takes provided repository and provide me with the stats (similar to above screenshot) as described by github-linguist functionality.
Based on some research so far, all i have is following code.
require 'rugged'
require 'linguist'
target=""
repo = Rugged::Repository.new('https://github.com/NameOfRepo')
project=Linguist::Repository.new(repo,repo.head.target)
project.language
project.languages
But having error, and I need a guidance related to the error and a better way to reach my goal.
Error: Error from script, Visual Code
I am new to ruby and I would like for some help ?
I am aware of how to change my path to local clone repository path in above code. I am looking for help with writing scripts that traverse through online github repository and provide me the stats.
You need to pass the path to a directory to Rugged::Repository.new(), not a URL:
repo = Rugged::Repository.new('/home/ShaishavMaisuria/NameOfRepo')
FYI, the source code for the github-linguist executable is at https://github.com/github/linguist/blob/master/bin/github-linguist.
I have an application packaged and signed as an MSIX, it installs and runs from the start menu. I'd like to be able to run the application from the command line too, for automated testing, but I can't see a way to do it. From powershell the docs suggest Invoke-CommandInsideDesktopPackage, but that requires developer mode which I'd rather not enable on test machines, and also is not the same as just running the app. What I'd love is a simple command line command that starts the app in the same way that the start menu does it.
By design, the binaries from an installation folder of an MSIX folder are not directly accessible through their direct path.
The correct way to run an app from the command line from an MSIX package is with the use of an execution alias. The following article contains more details about how an execution alias works and how you can define it in your package, no matter the tool you use to build the MSIX package.
- App Execution Alias
Also, here is a related question on SO.
I'm using ArchLinux/KDE/Plasma and I'm trying to program a lua script (as a plugin in TeamSpeak 3) that will execute the following command, which works in my terminal emulator, but not via a Lua script (that seems to be running as the same user).
The following fails:
os.execute("qdbus org.mpris.clementine /Player org.freedesktop.MediaPlayer.Pause")
I'm wondering if it's a permissions or library requirement? I know os.execute is working though, because I can run system notifications. I've tried alternative commands like machinectl, but those fail as well. I'm very new to Lua, do I need a dbus library? If so, I have no clue how to implement it.
I'm building a project based on descjop and reagent, created using the command:
lein new descjop <myproj> +reagent
The repl started by lein figwheel works ok but has very basic functionality. There is no command history, and no cursor control. Ideally I would like the full cider/nrepl/clj-refactor functionality but just some basic history and command editing would do.
Is there any easy way to improve the current repl? I have tried exploring the generated code, but I can't see how the decjop template is setting up the clojurescript repl. Any clues to how this works would be helpful.
Alternatively is there any way I can set up an alternative clojurescript repl to connect with my running electron app?
If you are on a Unix type machine then you can install rlwrap. Then instead of starting the REPL from the command line like so:
lein figwheel
Start it like this:
rlwrap lein figwheel
Then you will get history (using up and down arrows) and basic editing.