I was wondering if it was possible to tell bash that all calls to echo or printf should be followed up by a subsequent call to fflush() on stdout/stderr respectively? A quick and dirty solution would be to write my own printf implementation that did this and use it in lieu of either built in, but it occurred …
Tag: linux
How can I uninstall or upgrade my old node.js version?
some time ago I have installed node.js on my Ubuntu system. with the following steps (dump of my history): My Version is v0.3.2-pre. Please, is there a clean way to get a new version by uninstall/install or upgrade? I have not much experience with make or git. Thanks Answer Do the exact same thing again. The …
How to open serial port in linux without changing any pin?
Posix requires changing RTS pin on port opening. I want a way to avoid it. Answer Having the same problem, I’d give it a try by patching the ftdi_sio kernel driver. You just need to uncomment a small piece of code in ftdi_dtr_rts() like this: and the RTS handshake line is not longer changed upon open() …
How to load balance a php application?
I am looking for guides, advice, or samples of how to load balance a php application. My setup is Ubuntu 10.04 and PHP 5.3. I have never load balanced servers before and I am looking for any help that is offered. Update: It’s a web application that is expected to have a few hundred users using it at the…
Format of /dev/input/event*
What is the “format” of the character devices located in /dev/input/event*? In other words, how can I decode the character stream? A Python example would be greatly appreciated. Answer Right here in the Input.py module. You’ll also need the event.py module.
what are advantages and limitations of using mono project to run c# code on linux?
If anybody having the solution of advantages and limitations of using mono project to run C# Code on Linux, Please tell me your thoughts… Answer There’s a huge advantage – it works. You can use C#, develop, and run on Linux (and other platforms, including Windows). The disadvantage is that t…
Memcached not showing up in phpinfo()
I’ve installed libmemcached and memcached pecl extension for php and for some reason it’s not installing correctly? i’ve got memcached.so in /usr/lib64/php/ with the right permissions and libmemcache.so in /usr/local/lib/ Everything seemed to build correctly without error, and I restarted ap…
Given two directory trees, how can I find out which files differ by content? [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …
Paint Pixels to Screen via Linux FrameBuffer
I was recently struck by a curious idea to take input from /dev/urandom, convert relevant characters to random integers, and use those integers as the rgb/x-y values for pixels to paint onto the screen. I’ve done some research (here on StackOverflow and elsewhere) and many suggest that you can simply wr…
Sharing memory between processes through the use of mmap()
I’m in Linux 2.6. I have an environment where 2 processes simulate (using shared memory) the exchange of data through a simple implementation of the message passing mode. I have a client process (forked from the parent, which is the server) which writes a struct(message) to a memory mapped region create…