Posts Tagged ‘Linux’

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…)

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…)

RancidMeat: Shortcut

Friday, January 28th, 2011

Aside: Linux GUIs have shortcuts too (text .desktop files). A few lines of echo and the google-resistant specs will create one.
 
 
Shortcut is a Windows command to create, edit, or query windows shortcuts (binary .lnk files) from batch scripts.

It handles target, arguments, working dir, normal/minimized/maximized, icon, hotkey, and description. Everything but the Compatibility tab, which I think is an explorer/registry thing, not intrinsic to lnk files.
 
(more…)

Setting Tar Permissions Under Windows

Wednesday, January 19th, 2011

The perk of tarballs is they understand executable permissions, so users don’t have to chmod stuff when they extract.

Creating a tar in Linux/OSX is trivial. Run chmod as desired, and tar preserves everything.

mkdir TopDir
touch TopDir/somefile.txt
chmod 621 TopDir/somefile.txt
tar --create -f "archive.tar" "TopDir"

To see the permissions (aka mode), have tar do a verbose list.

tar -v --list -f "archive.tar"

Brace yourself… Windows makes this difficult.
 
Edit (2011-11-15): Added double quotes around windows wildcard args.
 
(more…)

RancidMeat: uconv and file

Sunday, October 31st, 2010

(file is below the fold)
 
 
Unicode is painful for three reasons.

  • Apps hide its presence from you: all too often, a hex editor is necessary to know what’s really there.
  • BOM headers sometimes break things (mysteriously due to the stealth), even in ostensibly unicode-aware tools (iconv, seriously!?). If unexpected, the headers look like binary garbage. Then things explode.
  • And tools to convert among text formats are hard to find, especially for windows.

 
I just found uconv. It’s pipable, and I don’t hate it yet ;) .
 
(more…)

App-Fu: VLC Plays Youtube Clips

Thursday, August 12th, 2010

VLC 1.1.x accepts youtube urls in its “Open Network Stream…” dialog.

It’ll opt for the highest resolution available, so if you want to force a less taxing quality, add this to your url.

http://www.youtube.com/watch?v=yadda&fmt=5

This means you can save it to a file without a separate downloader tool/site. And/or you can watch at 2x speed or crank up the volume to 400% with the mouse wheel. Unless you save before watching, it’s subject to buffering, so seeking is best avoided.
 
 
It relies on an external script to scrape the page and fetch the video. That’s what needs fixing when youtube’s site changes.

VLC_Dir\App\vlc\lua\playlist\youtube.lua

Judging from the dir listing, several other sites are understood too.