Posts Tagged ‘Windows’

RancidMeat: Mongoose

Tuesday, July 16th, 2013

Mongoose is my new favorite mini web server.

No installer; it’s just a standalone executable. When double-clicked, it hosts the folder it’s in on port 8080.

It lurks in the tray, where you can change its settings with a GUI (generating a mongoose.conf file).
 
 
Some of its features:

  • It can serve perl/php/etc (checking shebang lines and running the appropriate interpreter, if available).
  • When there’s not even an index.html, it can show directory listings.
  • From a commandline, it can create/edit passwords for basic HTTP authentication (htpasswd).
  • It’ll do HTTPS if you’ve got a certificate.
  • As of version 3.8, it lets wget resume downloads (previous versions didn’t understand wget’s request).

 
Article: User Manual on GitHub.
Article: Linux manual, for commandline args.

Windows 8 Breaks NTFS in Linux

Thursday, May 30th, 2013

Warning: A hibernation feature called “Fast Startup” defaults to ON in Windows 8, which leaves the filesystem in an unsafe state every time you shutdown. Based on an assumption that you’ll just boot Windows again next time.

Do not mount NTFS partitions outside of Windows 8 unless that feature is disabled beforehand. For more, see this article.
 
 
Future versions of Linux’s filesystem driver will warn about this and suggest mounting read-only.

Knoppix 7.05 already includes a warning for this, though the nag has a cosmetic bug. It tries to spawn a GUI popup, which fails if you booted straight to a console root prompt.

RancidMeat: The Dude

Friday, November 11th, 2011

screenshot
The Dude network monitor is like a combination of nmap, visio, and nagios to discover / identify network devices, make a graphical image to depict topology, and monitor open ports for service health. It runs under Windows, Linux Wine, and OSX Darwine.
 

 
* It doesn’t by itself plot geographical locations, but you can use a background image of a map and arrange things yourself.

RancidMeat: FreeRapid

Monday, October 31st, 2011

Freshmeat.net has changed its name, so this title’s gonna make less sense. *shrug*

screenshot
Y’know those websites that host files but make you wait and fill out a captcha? FreeRapid is a download manager that knows how to interact with 230+ of em, so you can do more interesting things than stare at a countdown.

It’s mainly for when you’ve got several urls to queue up, but apparently it can save Hulu and YouTube videos too.*

It’s updated relentlessly to keep up with those sites and fetches new plugins each time you start it.
 
 
If you start it with the ” --portable” arg, it’ll keep its config files in its own directory.
 
 
* To set a preferred YouTube video quality, dig through some menus… Options/Preferences/Plugins/youtube.com/options.

Tab-Delimited vs Line-Delimited

Friday, September 16th, 2011

Say you’ve got some text: tab-separated fields with newlines for records… (It’s what you get when you highlight/copy a block of spreadsheet cells, then paste into notepad.)

tabbed.txt:

A b c d
E f g h

 
 
… and you’d like to make it a vertical wall of text instead.

cat tabbed.txt | sed "G" | tr "\t" "\n" > lined.txt

The sed bit adds an extra blank line between records.
 
lined.txt:

A
b
c
d

E
f
g
h
 

 
 
That was easy enough. Now what about the reverse?
 
(more…)

Drag and Drop SSH Uploading in Windows

Saturday, August 20th, 2011

I routinely upload stuff to an ssh server, and I wanted to do away with the clicks needed to start a gui client or keystrokes for commandline. So below the fold is a batch script that you can drop one or more files onto, and it’ll quietly call PSCP for each with no further interaction.

If course, it’s trivial to tweak the script to call any command you want against dropped files.
 
Edit (2011-08-26): Added dir recursion, added an exit code, and removed the -batch arg complication.
 
(more…)

RancidMeat: The Regex Coach

Tuesday, June 28th, 2011

screenshot
If you haven’t dealt much with regular expressions, The Regex Coach is an invaluable learning tool.

Give it a pattern at the top, and in a demo string at the bottom, it highlights the matching segments.

You’ll get waaay more benefit from sed, grep, and string replacement in programming languages once you’ve trained a bit with this.
 
 
When you put this knowledge to use, there will be some variation from environment to environment when it comes to the fancy tricks: basic regex < extended regex < perl regex. Some commands have args to choose which syntax. And depending on quoting, you may need to backslash-escape stuff.

This general regex reference is excellent (nav on the left of that page links to more reference pages, as does the heading of each table).

RancidMeat: GUI diff with WinMerge

Tuesday, June 28th, 2011

screenshot
When you’ve got a couple similar text files and you only want to make a few lines match, the diff command’s not so helpful.

WinMerge is a two-pane GUI that lets you scroll from difference to difference, deciding which blocks one pane should copy from the other. Like the command, WinMerge can also compare directories: altered files among the results can be double-clicked to see what’s inside.

Linux equivalents include Meld, KDiff, and tkdiff. Or running WinMerge Portable under Wine.

Idea: Podcast Speaker Subtitles

Wednesday, April 6th, 2011

When podcasts have 4+ hosts and guests VoIPing, it’d be nice to have a subtitle track that displays the name of the speaker at each moment. Technically nearly doable.

Yes, VLC can show subtitles for audio-only media. Since 0.9.x, you can see them if you turn on visualizations. Alas, no all-black visualization at the moment.*

Video conferencing often has a brady bunch collection of heads with name labels that light up when their mic hears something. Skype and friends could maybe have a script/plugin/eavesdropping-client that logs the times someone speaks, then later converts that to subtitles.
 
(more…)

App-Fu: Making VS2010 Apps More Compatible

Wednesday, March 16th, 2011

I loves me some Ncat (improved netcat, from the nmap suite). So when 5.51 came out I was excited; no big features this time, fanboy reaction nonetheless. Thing is: the devs made what one might think a minor decision to use the latest compiler, Visual Studio 2010. Learning ensued.

Any app built with VS2010 will refuse to run on Win2000, WinXP through SP1, and Win2003 RTM. Because Microsoft introduced two irrelevant functions in later kernel32.dlls, and the visual runtime has an all-or-nothing expectation for the functions it points to. Dependency Walker highlights such broken exes’ missing libs/funcs red. There is a pretty simple way to subvert this.

Esoteric technomancy follows…
 
(more…)