VCS 1.12.3 released

I haven't updated VCS in a while and somehow managed to keep this update ready but unreleased for months, so today I decided it was about time to get rid of it and be free to work on 1.13 😛

This is a minor update with a couple bugfixes, but most importantly, it marks the switch to bash 3; this means a lot of small changes to the code so you should update to 1.12.3 to test if it works correctly before I release future versions (eventually 🙂 with much more important changes.

Changes (excerpt):

  • Bugfix: Actually handle –ffmpeg and –mplayer [#169]
  • Bugfix: Correct parsing of -U [#187]
  • Switch to a minimum of bash 3.1 [#173]
  • Avoid re-capturing the same frame twice [#122]
  • Use getent instead of /etc/passwd when available
  • Bugfix/Internal: Don't use mplayer's length as a ceil for timecode removal [#174]

vcs 1.12.3
http://p.outlyer.net/vcs/files/vcs-1.12.3.gz (script only)

or
http://p.outlyer.net/vcs/files/vcs-1.12.3.tar.gz (script, sample configuration, manpage and profiles)

deb, rpm, PKGBUILD & bz2
as usual at http://p.outlyer.net/vcs/

Relevation 1.1 released

A small update for Relevation.

It will now handle wrong passwords a bit more gracefully and it's also easier to use on Windows now.

Full list of changes:

  • Support cryptopy if PyCrypto is not available. Enhances cross-platform support.
  • Print an error message if the decryption produced wrong data (normally caused by a bad password)
  • Add PyCrypto/cryptopy to version info (--version)
  • Windows support enhancements:
    • Minimalistic GUI
    • Py2exe support
    • Packaging scripts
  • Fix $ make uninstall procedure

Relevation 1.1

http://p.outlyer.net/relevation/files/relevation-1.1.tar.gz
or
http://p.outlyer.net/relevation/files/relevation-1.1.zip (zip includes PDF and HTML manpage)

pre-packaged
http://p.outlyer.net/relevation/files/relevation_1.1-upstream.1_all.deb

New tool released: Relevation

I've just published a new tool I named 'Relevation'.

It's a command-line tool to access the passwords stored with the excellent Revelation Password Manager, which only provides a graphical interface.

I've been using the basis of my new tool on my computers for more than 4 years now and decided I might as well release it for others to use in case anyone else is interested.

It's is written in Python and has fairly simple dependencies, so it is easy to test and requires no compilation.

Its website is located at p.outlyer.net/relevation/.

Relevation 1.0:

Tarball
http://p.outlyer.net/relevation/files/relevation-1.0.tar.gz
deb package
http://p.outlyer.net/relevation/files/relevation_1.0-upstream.1_all.deb

Quick tip: Concatenating video files (with no quality loss)

Concatenation of video files can be done quickly from the command-line, video files must "match" (e.g. a movie formerly split into parts) i.e. they must use the same codec and parameters, this methods won't work as expected with random files.

  • AVI files: Use mencoder with multiple inputs
    $ mencoder -oac copy -ovc copy -o output.avi input1.avi input2.avi [...]
  • MPEG files: They can either be concatenated directly:
    $ cat input1.mpg input2.mpg > output.mpg
    Or the mencoder method, which I prefer, can be used (note the output format must now be set):
    $ mencoder -oac copy -ovc copy -of mpeg -o output.mpg input1.mpg input2.mpg [...]
  • Quirks and other formats:
    • The mencoder method won't work for multi-audio files
    • mencoder has worse support for other formats, they might require an intermediate transmuxing to avi.

I'll update this post if I find better ways or alternatives to do this.


References:

Native flash plugin in 64 bits, Debian package

Adobe has had an awful track record with their Flash plugin as far as 64bits support go, forcing us to use 32 bits plugins. But since some time ago they re-booted their efforts with the Flash Player "Square" project, gaining *native* 64bits support in Linux, Mac OS X and Windows, albeit in a parallel unofficial developer release.

For those of you using Debian, Ubuntu or derivatives on the amd64 platform, I'm sharing here my packaging script which will generate a DEB package that should install (and uninstall) cleanly. I won't be sharing binary packages since this is non-free stuff but it should be easy enough to create them following these instructions.

Instructions:

This should generate a package named "mozilla-flashplugin-square-nonfree_10.3.d162.p3-out.1_amd64.deb", which you can install with 'dpkg -i'.

The plugin should be loaded on the next start of Firefox/Iceweasel, Mozilla/IceApe, Google Chrome, etc.

Site is back to normal, finally

After a whole month of mess after my shared webhosting got hacked, my sites are now back to normal, all downloads should be available again.

This has been so annoying to get fixed I'm unable to find words to describe the experience.

In the meantime I've moved some stuff into two new sites: The pictures that used to be here are now in corvera.eu and any blog posts which are not status updates / release announcements will go into w.corvera.eu.

Old code: CSS rules on the fly from JavaScript (2006)

Again, some old code I'm not using anymore since I switched to jQuery but that might be useful for someone:

/*
 * Public Domain
 * Created by Toni Corvera <outlyer@outlyer.net> in September, 2006
 *
 * Creates a new CSS ruleset, should work with multiple rules correctly
 * e.g.:
 *    loadCssRules('body{font-family:sans-serif;}a:link{color:red;}');
 */
// void function loadCssRules(String rules)
function loadCssRules(r) {
	if (!document.createElement) return;
	var newStyle=document.createElement('STYLE');
	newStyle.setAttribute('type', 'text/css');
	newStyle.appendChild(document.createTextNode(r));
	document.getElementsByTagName('HEAD')[0].appendChild(newStyle);
}

Downloadable file: http://p.outlyer.net/graveyard/net_outlyer_dyn_css.js

Old code: DOM extensions (2004-2006)

Nowadays I'm using something more powerful like jQuery or base2.DOM, but if you don't, these might prove useful.

/*
 * Copyright 2004-2006 Toni Corvera <outlyer@outlyer.net>
 *
 * License: http://www.gnu.org/copyleft/lgpl.html LGPL
 *
 * Extra DOM-like methods (Note that at the time of writing they can't be
 * bound to the Document prototype, so they are global functions)
 *
 *    getFirstChildByTagName(HTMLElement parent, String tagName)
 *       First child of parent with tag tagName, NOT-RECUSIVE
 *    getFirstSiblingByTagName(HTMLElement node, String tagName)
 *       See above
 *    getChildrenByClassName(Node parent, String className)
 *       Obtains an array with the children of parent that have
 *       the class className (supports multi-class elements), NOT-RECURSIVE
 *    getChildrenByTagName(Node parent, String tagName)
 *       Obtains an array with the children of parent that have
 *       the tag tagName, NOT-RECURSIVE
 *
 *    hasClass(HTMLElement element, String className)
 *       Checks if element has class className, supports multi-class elements
 *    removeClass(HTMLElement element, String className)
 *       Remove class className from element's classes if present, supports
 *       multi-class elements
 */
// boolean hasClass(HTMLElement e, String className)
function hasClass(e, c) {
	if (!document.getElementById) return false;
	if (!e.className) return false;
	return null!=e.className.match(new RegExp('^(w*|.* )'+c+'(w*| .*)$'));
}
// void removeClass(HTMLElement e, String className)
function removeClass(e, c) {
	if (!hasClass(e, c)) return;
	e.className = e.className.replace(new RegExp(c,'g'),'');
}
// HTMLElement getFirstChildByTagName(HTMLElement parent, String tagName)
function getFirstChildByTagName(e,tag){
	if (!document.getElementById) return null;
	var f=null;
	for (var i=0;i<e.childNodes.length;++i) {
		if (e.childNodes[i].tagName == tag) {
			f = e.childNodes[i];
			break;
		}
	}
	return f;
}
// HTMLElement getFirstSiblingByTagName(HTMLElement node, String tagName)
function getFirstSiblingByTagName(e,t) {
	if (!document.getElementById) return null;
	var f=null;
	if (null==e.nextSibling || e.nextSibling.tagName==t) return e.nextSibling;
	return getFirstSiblingByTagName(e.nextSibling,t);
}
// Array getChildrenByClassName(Node parent, String className)
function getChildrenByClassName(n,c) {
if (!document.getElementById) return null;
	var a=new Array();
	for (var i=0; i<n.childNodes.length; ++i) {
		var x=n.childNodes[i]
		if(hasClass(x,c)){a.push(x);}
		a.concat(getChildrenByClassName(x,c));
	}
	return a;
}
// Array getChildrenByTagName(Node parent, String tagName)
function getChildrenByTagName(n,t) {
	if (!document.getElementById) return null;
	var a=new Array();
	for(var i=0; i<n.childNodes.length;++i){
		var x=n.childNodes[i];
		if(x.tagName==t){a.push(x);}
		a.concat(getChildrenByTagName(x,t));
	}
}

Downloadable file: http://p.outlyer.net/graveyard/net_outlyer_dom_exts.js

Old code: JavaScript x-browser arrays (2005, 2010)

Last update: 2010-12-09

This block of code is deprecated, I'm only keeping it for archival purposes, see below for a more up-to-date equivalent

/*
 * Public Domain
 *
 * Created by Toni Corvera <outlyer@outlyer.net>, 2005
 *
 * Defines Array.find, and Array.merge
 */
// int Array.find(Object)
if (!Array.indexOf) {/*IE has no indexOf*/
	Array.prototype.find = function(what) {
		for (var i=0; i<this.length; ++i) {
			if (this[i]==what) {
				return i;
			}
		}
		return -1;
	}
}
else {
	Array.prototype.find=Array.prototype.indexOf;
}
// void Array.merge(Array)
Array.prototype.merge = function(a) {
	for (var i=0;i<a.length;++i) {
		this.push(a[i]);
	}
}

Old location: http://p.outlyer.net/graveyard/net_outlyer_arrays.js.

Array.find and Array.merge are equivalent to the standard methods Array.indexOf and Array.concat.

  • Array.concat was added to IE in version 4.0
  • Array.push was added on version 5.5.
  • Array.indexOf is not so widely supported (IE6 doesn't support it -I'm yet to try higher versions-, Chrome does)

Updated:

// int Array.indexOf(Object)
if (!Array.indexOf) { /*IE has no indexOf*/
	//This prototype is provided by the Mozilla foundation and
	//is distributed under the MIT license.
	//http://www.ibiblio.org/pub/Linux/LICENSES/mit.license
	Array.prototype.indexOf = function(elt /*, from*/) {
		var len = this.length;
	    var from = Number(arguments[1]) || 0;
		from = (from < 0) ? Math.ceil(from) : Math.floor(from);
	    if (from < 0)
			from += len;
		for (; from < len; from++) {
			if (from in this && this[from] === elt)
		        return from;
		}
		return -1;
	};
}
if (!Array.push) {
	Array.prototype.push = function(e) {
		this[this.length] = e;
		return this.length;
	};
}

References:

VCS 1.12.2 released

Another minor update, although the last few versions have contained a really stupid bug that prevented the temporary files from being removed (leading to a lot of stale, possibly big, files), so upgrading is highly recommended. Thanks to Jason Tackaberry for pointing the bug.

Note though I'm still on holidays so this is a quick and dirty release (with little testing).

Changes:


vcs 1.12.2
http://p.outlyer.net/vcs/files/vcs-1.12.2.gz (script only)

or
http://p.outlyer.net/vcs/files/vcs-1.12.2.tar.gz (script, sample configuration, manpage and profiles)

deb, rpm, PKGBUILD & bz2
as usual at http://p.outlyer.net/vcs/
Scroll to Top