Archive for July, 2013

How to remove ANSI escape sequences

Monday, July 15th, 2013
alias stresc='sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"'

record / save asf stream with mplayer

Sunday, July 7th, 2013
mplayer -dumpstream mms://url?MSWMExt=.asf 

android perl boilerplate

Saturday, July 6th, 2013


#!/data/data/com.android.perl/files/perl/perl

use strict;
use warnings;

use Android;
use Data::Dumper;

my $droid = Android->new();

#print Dumper $droid->wifiGetScanResults();
#print Dumper $droid->readPhoneState();
#print Dumper $droid->getDeviceId();

for my $f qw ( checkNetworkRoaming
getCellLocation
getDeviceId
getDeviceSoftwareVersion
getLine1Number
getNeighboringCellInfo
getNetworkOperator
getNetworkOperatorName
getNetworkType
getPhoneType
getSimCountryIso
getSimOperator
getSimOperatorName
getSimSerialNumber
getSimState
getSubscriberId
getVoiceMailAlphaTag
getVoiceMailNumber
prefGetAll
getScreenTimeout
) {
print "$f\n";
print Dumper $droid->$f;
}