How you manage/organize your collection of code snippets on Linux? Is there a specialized tool to do that (both in GUI and CLI environment)? Is there any convention about code snippet management in Linux? Also, I often do some work via ssh so it would be really helpful if I can access my snippet easily from command line. I just moved to Linux for several months and still got to learn a lot about software development in Linux.
Any suggestion is appreciated.
Thanks!
I think this is what you are looking for: Snippely and jCodeCollector
I use Snippely on my mac, it awesome.
Update: Moved to Dash for mac: http://kapeli.com/dash
You could use Code Barrel to do that. For GUI based you could use the webapp but for CLI you could write scripts using the API. There is a plugin for Eclipse based IDEs as well.
Related
Right now I can create a simple Ms.Excel automation program using Python3 but I want to others can also use my program.
What kind of features or packages that I could learn to make others able to use my program? Such as turn my program into portable software or web application?
You need to look into packaging your python application with all its dependedncies. Pyinstaller is a good way to go you can find a very good tutorial here.
I cannot call myself an absolute beginner in go, and I'm definitively not an expert.
Today, I noticed something VERY confusing. I was experimenting with Unix sockets and Windows named pipes, and from my research, there are 2 packages that support Windows named pipes:
https://github.com/natefinch/npipe
https://github.com/Microsoft/go-winio (I could not find ANY documentation, help, how-to-use, whatsoever about this package)
My OS is Linux, and I decided to give it a go: go get the package(s), and write the code to later test on a Windows machine, but, to my surprise, at least in VSCode, those packages are not recognized by the tooling.
When I look at npipe for example, I see it only has npipe_windows.go, which, if I'm not mistaken, is supposed to automatically be used on Windows.
So, I think there is the concept of OS-specific packages in Go, right? And if so, does it mean that I cannot use, for example, VSCode's go tools to code against Windows packages on Linux?
That, in my opinion, would be extremely inconvenient to have to switch systems in order to write something that works both on Linux and Windows... Although I guess that's only true if we're developing on Linux, and Windows should cover both.
But for me, it doesn't make sense NOT to be able to develop something on Linux; the best environment to develop on IMHO (except Apple-related code of course)
Am I missing something here?
Thank you
So, I think my question actually involves more the tooling rather than the go language itself. gopls is the tool used by VSCode if you choose to use the go language server.
As thre README says, it's in alpha and not stable, and there are known issues listed on the repo, which seem to be the source of my confusions.
I think the main issue that's related to what I'm seeing is:
x/tools/gopls: does not handle build tags
I have been using a chrome book for a few months now. I also have been designing a web page. A lot of the work can be done via word press's lame gui, but like any coder, I want to use a real text editor, specifically vi/vim.
I have done some searching around. I found one java script implementation of vi, but it's not good enough IMO to use. Conversely, I'd like to ssh into one of my *nix boxes and use vi that way, although you cannot do that from web pages it seems. HTTP vs TCP issues. Not sure if WebSockets will be able to get around this.
Lastly, I've been looking at plugins. While some decent ones seem to be available for Firefox, the Chrome division is lacking severely.
One desparate try is vnc, but this chromebook has no javascrip support, not can I get the HTML5 vnc running quite right.
Does anyone have any suggestions?
Edit/Update:
Thanks for everyone's effort in answering. I quickly abandoned coding on the netbook, but it looks like some great answers were provided.
I am on a Samsung ARM Chromebook and I do a lot of development work in Vim. Here's how I prefer to do it:
Enable Developer Mode, then download crouton.
Open a shell:
<ctrl><alt>t
...and install Ubuntu command-line environment
sudo sh -e crouton -t cli-extra
Enter the chroot using
sudo enter-chroot
From inside the chroot install vim
sudo apt-get install vim
There are lots more instructions and examples on the crouton github page.
I prefer the command line only version because I can just have Ubuntu in another tab, and all the Chromebook keyboard shortcuts Just Work.
You have few options:
Cloud9, an IDE for JavaScript, Python, PHP, and Ruby. Cloud9 uses the HTML5 FileSystem capability and AppCache to sync files, so you can even code offline. It got some really nice features that I find myself using a lot: github integration, chat, the ability to work and do reviews on your code without any pain of ‘new/other’ tools.
Kodingen is an Online Development Environment including Code Editor, Cloud Hosting etc'. I haven’t play with it (yet) – but I’ve heard some friends that like it.
Codey - Easy to use code editor for HTML, PHP, CSS, JS. They are in Chrome web store.
Akshell - Server-side JavaScript development and hosting platform. They got some git integration built in their IDE.
I hope it helps.
For more, I've posted something about this Q few months ago: http://greenido.wordpress.com/2011/07/04/web-developers-and-the-new-chromebook/
There are web shells: this is the first one that came up with a search, but there are others. Be sure to use HTTPS and place it behind a authentication gateway. I can't vouch for how well they handle vim and it's interesting screen modes, but hopefully one of them might work.
How about SourceKit? Unforunately the bindings are closer to textmate, it has great highlighting and IMHO the text will be easier on the eyes than if you were looking at tiny shell font.
I've picked up a legacy application developed in C/C++ on Linux, using ncurses for UI. What automated testing tools are there for this environment?
Edit: I've used AutomatedQA TestComplete in the past, and this is the type of tool I'm looking for - except running on Linux, and with the ability to test Text UI apps.
I wrote something like that before. Not much docs, but you can try the code. It's written in Python and runs on Linux.
You would basically need the ANSIterm filter, and the expect module. Then you compose them into a filter. You'll likely have to start the process with the proctools module. They are all designed to work together or separately (modular).
I have considered using Rational Function Tester and TestComplete.
RFT has explicit support for testing this type of application (text-mode linux) via built-in terminal emulation.
TestComplete does not support testing Linux apps directly, but can be made to work by "testing" a COM-enabled terminal emulation program (Attachmate Reflection at this stage), and using COM from the test scripts to do screen scraping.
Have also considered using Reflection as the terminal emulator and rolling my own test framework in C# and NUnit.
Edit: "Final" solution is using Terminator (a Java terminal emulator), extending it with an RMI interface and using TestNG...
The expect tool sounds like what you need: http://linux.die.net/man/1/expect
Have a look at the free version of TETware from the Open Group. It is a full test harness based on TCL.
Are there any auto compiling scripts like the ones used at ideone.com and codepad.org available?
(preferably open source, and which execute the code in a safe environment.)
I don't think that they have special "autocompiling scripts". They could just be using normal compilers under a virtual machine for safety.
Or they could have developed something custom (Like Google app engine)
Update:
Apparently they are using normal compiler packages by Gentoo.
Why not to use Ideone API?