Skip to content

Instantly share code, notes, and snippets.

@zed9h
zed9h / trace_bitmap.jsfl
Created July 18, 2009 16:59
flash: trace bitmaps (e.g., an imported movie) on each frame of the timeline.
// http://www.dynamicflash.com/jsfl/
var doc = fl.getDocumentDOM()
var t = doc.getTimeline()
for(i=0; i < t.frameCount; i++) {
t.currentFrame=i
doc.selectAll()
doc.traceBitmap(
64,32,
@zed9h
zed9h / dtool.pl
Created July 18, 2009 17:41
edonkey file and network tool (for edonkey 2000 and mldonkey)
#!/usr/bin/perl -U
use strict;
select STDERR; $|=1;
select STDOUT; $|=1;
my $script = readlink($0) or $0;
my $root = $script =~ m{^.*/} ? $& : '/home/zed/bin'; # '/gw/share/mldonkey';
BEGIN { unshift @INC, "/home/zed/bin" }
use usermap;
@zed9h
zed9h / sql_client.asp
Created July 18, 2009 20:08
asp vb sql client, configured to access mdb
<% option explicit %>
<%
' TO DO:
' - remove navigation and col '#' in forwardonly recsets (e.g. sp_help (?)
' - use RS.NextRecordset for multiple queries, instead of GO
on error resume next
'---- CursorTypeEnum Values ----
Const adOpenForwardOnly = 0
Const adOpenKeyset = 1
@zed9h
zed9h / cruisecontrol-flipcolors.user.js
Created July 22, 2009 04:15
greasemonkey script to invert colors of cruise control builds view every 7 seconds
// ==UserScript==
// @name cruisecontrol-flipcolors
// @namespace cruisecontrol-flipcolors
// @description invert colors of cruise control builds view every 7 seconds
// @include http://*cruisecontrol*/dashboard/tab/builds
// ==/UserScript==
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
@zed9h
zed9h / virtuoso_sparql.user.js
Created October 10, 2009 01:02
Greasemonkey to improve the Virtuoso's SPARQL endpoint form
// ==UserScript==
// @name virtuoso sparql
// @namespace http://*/sparql
// @description melhorar a tela de query sparql do virtuoso
// @include http://*/sparql
// ==/UserScript==
document.getElementById("query").rows = 22;
document.getElementById("header").style.display = "none";
var e = document.getElementById("main").firstChild;
@zed9h
zed9h / dh-ddns.sh
Created October 10, 2009 23:28
DreamHost Dynamic DNS script for OpenWRT
#!/bin/sh
# DreamHost Dynamic DNS script for OpenWRT
# by Rodrigo Damazio <[email protected]>
# updated by Kyle Bassett <[email protected]>
# ported by Carlo 'zED' Caputo <[email protected]>
[email protected]
PASS=xxxxxx
ACCOUNT=123456
@zed9h
zed9h / oraclient.pl
Created October 30, 2009 23:35
simple SQL client to Oracle
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use DBD::Oracle;
use Text::ASCIITable;
use Term::ReadLine;
my $dbh;
BEGIN {
@zed9h
zed9h / .Xresources
Created January 5, 2010 03:13
Ubuntu 9.10 and ArchLinux config (Fluxbox 1.1.1-2 and others)
*.foreground: grey90
*.background: black
!*.faceName: DejaVu Sans Mono
!*.faceSize: 10
*.charClass: 35:48,36-38:48,40-43:48,43:48,45-47:48,58:48,61:48,63-64:48,92:48,95:48,126:48
*.scrollTtyOutput: false
*.scrollKey: true
*.saveLines: 5000
@zed9h
zed9h / track-upload.sh
Created February 17, 2010 15:41
track file upload progress on firefox or any other single-threaded linux browser
#!/bin/bash
export FILE=$1
export BROWSER=firefox
export PID=$(ps aux | sed -n "/grep/d;s/^$USER *\([0-9]\+\) .*\<$BROWSER.*/\1/p")
export FD=$(ls -l /proc/$PID/fd/ | sed -n "s/.* \([0-9]\+\) -> [^ ]*$FILE$/\1/p") # FIXME convert file to pattern
watch "cat /proc/$PID/fdinfo/$FD | sed -n 's/pos:\t//p' ; stat -L /proc/$PID/fd/$FD -c %s"
@zed9h
zed9h / regression-virtuoso.sh
Created April 13, 2010 03:19
[WIP] openlink virtuoso regression test script
#!/bin/bash
for t in test/*.isql
do
for v in /usr/local/virtuoso-opensource*
do
echo -n "$t $v "
killall virtuoso-t &> /dev/null
for i in 1 2 3 4 5 6 7 8 9 ; do pidof virtuoso-t &> /dev/null || break ; sleep 1 ; done
killall -9 virtuoso-t &> /dev/null