20080220

cairo-dock-plugins-20080209.ebuild



# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

WANT_AUTOCONF=latest
WANT_AUTOMAKE=latest
inherit autotools eutils

DESCRIPTION="Cairo-dock is a kind of dock applet, which doesn't depend on any gnome package."
HOMEPAGE="http://developer.berlios.de/projects/cairo-dock/"
SRC_URI="http://download2.berlios.de/cairo-dock/cairo-dock-sources-${PV}.tar.bz2"

LICENSE="GPL"
SLOT="0"
KEYWORDS="amd64 ppc x86"

PLUG_INS="Xgamma clock dustbin gnome-integration logout powermanager rendering rhythmbox shortcuts systray terminal"
IUSE=${PLUG_INS}

DEPEND="gnome-integration? (>=gnome-base/gnome-vfs-2.0
                                >=gnome-base/libgnomeui-2.0)"

RDEPEND=${DEPEND}


S="${WORKDIR}/tmp/trunk/plug-ins"

src_unpack() {
    unpack cairo-dock-sources-${PV}.tar.bz2
    cd "${S}"
    # powermanager plugin has a missing po directorry. We need to fix this
    # before we run autoreconf.
    use powermanager && epatch ${FILESDIR}/${P}-488-powermanager.patch || die "failed patching with  ${FILESDIR}/${P}-488-powermanager.patch"
    # The patch creates the directory from svn:488

    for plugin in ${PLUG_INS};
    do
        if use ${plugin};
        then
            pushd ${plugin}
            eautoreconf || die "eautoreconf failed on ${plugin}"
            econf || die "econf failed on ${plugin}"
            popd
        fi
    done
}

src_compile() {
    for plugin in ${PLUG_INS};
    do
        if use ${plugin};
        then
            pushd ${plugin}
                emake || die "emake failed on ${plugin}"
            popd
        fi
    done
}

src_install() {
    for plugin in ${PLUG_INS};
    do
        if use ${plugin};
        then
            pushd ${plugin}
                emake DESTDIR="${D}" install || die "emake install failed on ${plugin}"
            popd
        fi
    done
}




  • Platform : Gentoo Linux
  • Script : ebuild
  • desc :

    This is an ebuild for cairo-dock plugins. WARNING: Many dependencies might not be included. Please do leave any dependencies you may find in the comments and I'll update the script accordingly. YMMV.


20080215

cairo-dock ebuild



# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

WANT_AUTOCONF=latest
WANT_AUTOMAKE=latest
inherit autotools eutils

DESCRIPTION="Cairo-dock is a kind of dock applet, which doesn't depend on any gnome package."
HOMEPAGE="http://developer.berlios.de/projects/cairo-dock/"
SRC_URI="http://download2.berlios.de/cairo-dock/cairo-dock-sources-${PV}.tar.bz2"

LICENSE="GPL"
SLOT="0"
KEYWORDS="amd64 ppc x86"

S="${WORKDIR}/tmp/trunk/${PN}"

src_unpack() {
    unpack cairo-dock-sources-${PV}.tar.bz2
    cd "${S}"
    eautoreconf || die "eautoreconf failed"
    econf || die "econf failed"
}

src_compile() {
    emake || die "emake failed"
}

src_install() {
    emake DESTDIR="${D}" install || die "emake install failed"
    dodoc ANNOUNCE AUTHORS ChangeLog NEWS README* TODO
}




  • Platform : Gentoo Linux
  • Script : ebuild
  • desc :

    This is an ebuild for cairo-dock. WARNING: No dependencies included. Please do leave any dependencies you may find in the comments.


20070827

Patch to aggdraw for 64 bit machines


diff -Naur aggdraw-1.1-20051010/agg2/include/agg_array.h
aggdraw-1.1-20051010-64/agg2/include/agg_array.h
--- aggdraw-1.1-20051010/agg2/include/agg_array.h 2005-05-03
17:57:34.000000000 +0530
+++ aggdraw-1.1-20051010-64/agg2/include/agg_array.h 2007-08-22
00:19:48.000000000 +0530
@@ -520,7 +520,7 @@
int8u* ptr = m_buf_ptr;
if(alignment > 1)
{
- unsigned align = (alignment - unsigned(ptr) %
alignment) % alignment;
+ unsigned align = (alignment - (unsigned
long)(ptr) % alignment) % alignment;
size += align;
ptr += align;
if(size <= m_rest)



  • Platform :Linux, Python/C++
  • Script : Diff Patch
  • desc :

    This patch lets aggdraw compile and work fine for my requirement. But
    I haven't extensively tested it. YMMV.


20070203

voice copy



#!/usr/bin/perl

use File::Copy;

if ($ARGV[0] =~ /\/$/) {
$src = $ARGV[0];
} else {
$src = $ARGV[0] . "/";
}
if ($ARGV[1] =~ /\/$/) {
$dst = $ARGV[1];
} else {
$dst = $ARGV[1] . "/";
}

opendir(DIRHANDLE, $src) || die "Cannot opendir $src: $!";
foreach $fname (readdir(DIRHANDLE)) {
if (!($fname =~ /^\./))
{
$file = $src . $fname;
@t = localtime ( ( ( stat ( $file ) ) [9] ) );
@f = split(/[(.]/,$fname);
$s = sprintf("@f[0]_%04d%02d%02d_%02d%02d%02d.wav",$t[5]+1900,$t[4]+1,$t[3],$t[2],$t[1],$t[0]);
printf("%s\t%s\n",$file,$dst . $s);
copy($file, $dst . $s) || die "Cannot rename $file to $s: $!";
}
}
closedir(DIRHANDLE);







  • Platform : Unix
  • Script : perl
  • desc :

    An improved version that copies the files from source directory to destination directory after renaming.


voice rename


1 #!/usr/bin/perl
2
3
foreach(@ARGV){
4 @t = localtime ( ( ( stat ( $_ ) ) [9] ) );
5 @f = split(/[(.]/,$_);
6 $s = sprintf("@f[0]_%04d%02d%02d_%02d%02d%02d.wav",$t[5]+1900,$t[4]+1,$t[3],$t[2],$t[1],$t[0]);
7 printf("%s\t%s\n",$_,$s);
8 rename($_,$s) || die "Cannot rename $_ to $s: $!";
9 }



  • Platform : perl
  • Script : Rename voice files
  • desc :

    This is a script to batch rename the voice calls recorded on my phone to __


20060920

ScrapBook Relink


// ==UserScript==
// @name Relink profile -> scrapbook
// @namespace
// @description

// @include http://www.orkut.com/ScrapBook.aspx*
// ==/UserScript==

(function() {
i=document.lastChild.lastChild.childNodes[7].lastChild.firstChild.childNodes[5].childNodes[7].lastChild.childNodes[2].firstChild.childNodes[1].lastChild.childNodes;

var l = i.length-5;
for (var j=6; j<l; j+=4) {

var link = i[j].childNodes[5].childNodes[1].childNodes[1];
var linkparts = link.getAttribute("href").split("?");

link.setAttribute("href", "/ScrapBook.aspx"+"?"+linkparts[1]);
}
})();



  • Platform : Firefox (independent)
  • Script : JavaScript (Grease monkey)
  • desc :

    This script relinks the names in scrap book point to the authors scrap book than the Profile. The picture is still referenced to the Profile. speeds up orkutting a lot with keyboard lovers.


20060904

Send message to all on trillian


Opt("WinTitleMatchMode", 1)
WinWaitActive ("k_deepu_yadav")
AutoItSetOption ( "SendKeyDelay" , 1000)
While 1
Send("^v{ENTER}!{F4}{DOWN}{ENTER}")
WEnd



  • Platform : windows
  • Script : autoit
  • desc :

    Trillian unlike Y! msgr lacks the send all feature for offline contacts. This script creates a macro to send the msg to all


accept (default) answer for Internet Download accelerator


Opt("WinTitleMatchMode", 1)
While 1
WinWaitActive ("Confirmation")
Send("{ENTER}")
WEnd


  • Platform : windows
  • Script : autoit
  • desc :

    IDA uses 60 second time out to accept default answer but it holds up the slot on job queue. This makes it unsuitable for downloading the file tree like a linux distro. This script reduces the time out to null:P


Reconnect Freedom after Two hour Time out


run("C:\Java\JRE15~1.0_0\bin\javaw.exe -jar C:\Freedom\freedom.jar", "C:\Freedom")
While 1
WinWaitActive("Your Freedom 2006")

ProcessClose ( "javaw.exe" )
ProcessWaitClose ( "javaw.exe" )

run("C:\Java\JRE15~1.0_0\bin\javaw.exe -jar C:\Freedom\freedom.jar", "C:\Freedom")
WEnd


  • Platform : windows

  • Script : autoit

  • desc :

    The 'Your Freedom' servers follow a policy to disconnect the free accounts after 120min(which used to be 240min earlier.) This scripts watches for the warning/info window and reconnects the service by killing and creating another instance of freedom.


  • ToDo :

    You need to select the option to autoconnect in freedom. Also it would be advisable to have the minimise on startup option enabled.


  • alt :

    The process manager shows 3-5% CPU usage, which is quite high for a dormant process. Though it did not slow down my machine, an efficient solution would be to remove the loop and schedule it to runevery 2hrs using scheduled jobs in windows.