Skip to content

Instantly share code, notes, and snippets.

@jonasbits
Last active December 16, 2015 03:09
Show Gist options
  • Save jonasbits/5368060 to your computer and use it in GitHub Desktop.
Save jonasbits/5368060 to your computer and use it in GitHub Desktop.
Squid Secondlife texture script found at http://wiki.phoenixviewer.com/squid_proxy_cache
#!/usr/bin/perl
$| = 1;
while (<>) {
chomp;
if (m/sim(.*?)\.agni\.lindenlab\.com(.*?)\/cap\/(.*?)\/\?texture_id=(.*)/) {
print "http://agni.lindenlab.com/texture/" . $4 . "\n";
} else {
print $_ . "\n";
}
}
test this with regexpal http://regexpal.com/
and put in
sim(.*?)\.agni\.lindenlab\.com(.*?)\/caps\/(.*?)\/?texture_id=(.*)
and test with
http://simXXXX.agni.lindenlab.com/cap/918c0998-68ce-4ac5-aada-a22f9af53e87/?texture_id=89556747-24cb-43ed-920b-47cabd15465f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment