Feeds:
Posts
Comments

I suddenly have discovered that Google has just redlisted a tiny and free network scanning application I wrote some time ago: netscan. This happened recently, and I still do not understand why.

Interesting that it wasn’t redlisted since 2008, and recently it was added to the harmful programs site, thus presenting me with the following:

reds

every time I try to access https://sourceforge.net/projects/netscan/. I don’t know anything about the presence of harmful programs … there are definitely no harmful programs hidden in there, there never were and never will be, I just feel it’s an algorithmic mechanism kicking in based on some erroneous input.

netscan is a free and widely downloaded application, according to the statistics:

scanstat

which is opensource (sources can be obtained from  https://sites.google.com/site/fritzone/netscan) and I also offer some limited email support. Also an interesting fact to be observed from the graph is the drop of downloads from the introduction of the red-list.

To not to mention that till now, if you typed in “netscan” into the google search you would have got it in usually the second or third place, now it’s not even shown. duckduckgo (and yahoo) however are much closer to reality, they still “remember” the application:

ducks

 

Certainly there is support in order to remove the site from the red-list, but that is mostly aimed to self owned sites which have been hacked. Which is not my case… Now I’m trying to get it off the red list again…

An old engine

Totally not related to programming…

I have read about the first diesel engine (1938, Sulzer, number  241001-002 DE) utilized by the Romanian railway: http://www.derbysulzers.com/cfrprototype.html and I as very please that the article had also some nice photos. And it also mentioned that the train is at the Dej (city in Romania) rail depot. And to my biggest surprise, here it is:

https://www.google.no/maps/@47.1581106,23.9112557,3a,43.4y,188.75h,88.69t/data=!3m6!1e1!3m4!1s35jDZ_OegzoUDPE9A3lppw!2e0!7i13312!8i6656

Hm, what does a Windows XP screenshot do in Microsoft’s flagship Office product do? No idea, I just received it today:

xpbox

You just have to move your mouse to show the tooltips for the Message Options, and the screenshot will pop out in a second.

Regardless, clicking it will bring back the standard Windows 7 message box, so it seems a screenshot was lost in the transition somewhere.

7box

 

While trying to read some fine details about some C macros … I couldn’t. Somehow the browser rendered the parts of the

text describing the __COUNTER__ behaviour outside of the visible area …

ff_error

Ohh, might be that I use Firefox. Let’s see with Internet Explorer.

ie_error

Nope… Same problem.

Let’s fall back to our old friend … lynx.

lynx

Works as expected.

The following script goes into /usr/local/bin. Call it svn-color.py

#!/usr/bin/env python

"""
 Author: Saophalkun Ponlu (http://phalkunz.com)
 Contact: phalkunz@gmail.com
 Date: May 23, 2009
 Modified: June 15, 2009
 
 Additional modifications:
 Author: Phil Christensen (http://bubblehouse.org)
 Contact: phil@bubblehouse.org
 Date: February 22, 2010
"""

import os, sys, re, subprocess

tabsize = 4

colorizedSubcommands = (
	'st',
	'status',
	'add',
	'remove',
	'diff',
)

statusColors = {
    "M"     : "31",     # red 
    "\?"    : "37",     # grey
    "A"     : "32",     # green
    "X"     : "33",     # yellow
    "C"     : "30;41",  # black on red
    "-"     : "31",     # red
    "D"     : "31;1",   # bold red
    "\+"    : "32",     # green
}

def colorize(line): 
    for color in statusColors:
        if re.match(color, line):
            return ''.join(("\001\033[", statusColors[color], "m", line, "\033[m\002"))
    else:
        return line

def escape(s):
    s = s.replace('$', r'\$')
    s = s.replace('"', r'\"')
    s = s.replace('`', r'\`')
    return s

def line_exp(x):
    return {
        'A': "Added",
        'D': "Deleted",
        'M': "Modified",
        'R': "Replaced",
        'C': "Conflicts",
        'X': "Externals",
        'I': "Ignored",
        '?': "Untracked"
    }[x]

passthru = lambda x: x
quoted = lambda x: '"%s"' % escape(x)

if __name__ == "__main__":
    all_lines = []
    cmd = ' '.join(['svn']+[(passthru, quoted)[' ' in arg](arg) for arg in sys.argv[1:]])
    output = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
    cancelled = False
    for line in output.stdout:
        line = line.expandtabs(tabsize)
        if(sys.argv[1] in colorizedSubcommands):
            if not line.startswith("Performing") and len(line)>2:
                all_lines.extend( [line] )
        else:
            print line

    all_lines.sort()
    prev_beg = ''
    for line in all_lines:
		if prev_beg != line[0]:
			print line_exp(line[0])
			prev_beg = line[0]
		line = colorize(line.rstrip())
		line = line.translate(None, '\2')
		line = line.translate(None, '\1')
		print "\t", line

    print ""

And modify ~/.bashrc to contain:

alias svn=/usr/local/bin/svn-color.py

The most confusing reply

While starting dropbox from the command line …

me@tide:~ > dropbox start
Starting Dropbox…Dropbox isn’t running!
Done!
me@tide:~ >


Starting Dropbox … Dropbox is’t running. I know that, this is the reason I wanted to start it … but “Dropbox is’t running” after Starting is just confusing me, so did you manage to start it or not?

Done! Sorry, done, What? Did I manage to start Dropbox or not?

Seems someone did not pay too much attention to the intuitiveness of the command line application’s reply. But it’s ok, anyway who is using command line anymore?

So, as usual I try to convert a pretty big Word document (found in a Dropbox folder) to PDF and save it directly into the same folder for later mobile consumption… and word panicks:

error

Voooow….. This operations has just been working with my “old word (2010)” … But this shiny new Office 365 seems it cannot handle this. As a revenge I will call it Office 364.

Certainly, the culprit is that the Dropbox client tries to work with the file … while it is being used by word. Oh no, this won’t work. Let’s pause syncning in Dropbox, save the file (with a bunch of extra keystrokes, when compared with my old version … I can’t say that I like it) and reenable syncing. Does it work now? Yes, it certainly does. …. However it should not be this complicated. Should it?