Hi!

Valeriu Paloș

I’m Valeriu — still the kid fascinated by building the world; just with better tools. Lately, some of them are about making math visible and easy to get.

  • Loomiere/Stream – A high performance streaming server

    UPDATE: http://vpalos.com/1165/loomiere-2-0-1-beta-finally-out/ The Loomiere (0.2.1) code is now freely available under GPLv3. Please see this post for an update. Are you killing psstream? Well, yes! I am sure that many of you already know about psstream (the PHP streaming extension I made a while back). Well, many things happened since then and I came to realize…


  • Recursive chmod distinguishing files from folders

    Version 3 An even better method is: find “$target” -type f -exec chmod -c “$mode_files” {} \; \ -or -type d -exec chmod -c “$mode_dir” {} \; A true one-liner! 😀 Version 2 A better method is this: find “$target” -type f -exec chmod -c “$mode_files” {} \; find “$target” -type d -exec chmod -c…


  • Bash URI parser using SED

    Warning! This version is now obsolete! Check out the new and improved version (using only Bash built-ins) here! Here is a command-line (bash) script that uses sed to split the segments of an URI into usable variables. It also validates the given URI since malformed strings produce the text “ERROR” which can be handled accordingly:…


  • Recursive file/directory change-detection

    Disclaimer This article explores a way in which an approximate “fingerprint” of a file tree can be created! If all you want is to detect file changes a much more appropriate method would be to use inotify/incron. Version 2 (update) Another, much faster method would be to use ls -lR to browse over the filesystem.…


  • Detect number of CPUs on a machine

    UPDATE: Steven pointed out (very nicely) that there’s no need for cat in this picture, grep would do just fine on its own. So, thanks Steven! Detect how many CPU cores are present on the running machine: grep -c processor /proc/cpuinfo This can be very useful when writing multi-threaded programs to properly match the number…