Eduroam and IRC

September 23rd, 2013 § 0 comments § permalink

SSH tunnelling out of eduroam network.

The six words version of a post looks promising and challenging.

So… I’m sitting somewhere in the university campus, trying to access IRC, connected through an eduroam node… and I can’t.

Turns out you can’t1 do much more other than web or mail traffic2. Bummer.

So the first thing popping to my mind is to use a VPN, but those services are sort of expensive when on a student budget.

Idea #2 is to SSH tunnel but, as is, that’s sort of a bummer3. So why not use sshuttle? I mean, it’s still tunnelling but now it’s transparent (all your network will tunnel through it) and you don’t need to change any of your configuration. All you need is still an external machine where you can ssh into and from where you can connect to you desired service.

Just run ./shuttle username@domain 0/0 and you’ll be fine!

PS. This post was hanging here for so long, so I’m just posting it mostly as I found it, have fun!

  1. I don’t know if this is general eduroam policy or just my university policy. []
  2. http://www.wifi.polimi.it/en/wi-fi/eduroam-network/ []
  3. You need to reconfigure your client everytime you switch from tunnelling vs non tunnelling to enable/disable the proxy for your client. []

A geeky toy, for a geeky boy.

March 3rd, 2009 § 1 comment § permalink

I’m sure all of you know what the rubik’s cube is, if you don’t… I mean, really? man what was you thinking until now? Well If you REALLY don’t know it then you should at least google for it. Wikipedia will work as well.

rubik's cube

I always thought it was a logic puzzle, and after some unsuccessful tries I decided to cheat, googled for “rubik’s cube solution” and I found out a beautiful site, which explains everything you need to solve the cube in a very simple and fast way, it is of course the Lars Petrus method.

Once learnt a solution method there is no more “logic” in it. Where is the fun part? What’s the challenge?
I was terribly wrong. It is not a logic-puzzle, it is a memory-puzzle, and a hand-dexterity-puzzle.

You need to remember the moves of your solving methods, they are almost always the same (in the petrus method there are 4 basic moves), but the most challenging part is how fast can you solve the cube?

Hey “how-fast” sounds damn challenging, how can you measure that? You’ll need a stopwatch. If you are at least half geeky as I am you’d be already on google at the moment and starting to type something like “online stopwatch” or “online timer”.

There are tons of them, but all have a very annoying interface that make you use the mouse. Given that you are a very good speedcuber you don’t want to loose 0.3s to start to solve and an other 0.3s to stop the timer, do you?

Well I wouldn’t care as I need 1’30”+ to solve the cube, but I found fun to code a stopwatch designed to work with Miss Spacebar instead of your loveable mice.

nigma timer

the simple nigma timer is written in simple html/css/js and as a very simple interface, I hope you’ll enjoy it.

return ”

GCJ – Practice Contest – Old Magician

October 13th, 2008 § 0 comments § permalink

Wow, an other practice contest came out :^D here’s the first problem, very simple solution :^)

from __future__ import with_statement
 
def solve(w,b):
    return "BLACK" if b%2==1 else "WHITE"
 
def eatFile(fin, fout):
    with file(fin,'r') as f1:
        N = int(f1.readline().replace("\n",''))
        with file(fout,'w') as f2:
            for case in xrange(1,N+1):
                w,b = [int(i) for i in f1.readline().replace("\n",'').split(' ')]
                s = solve(w,b)
                #print "Case #%d: %s" % (case, s)
                f2.write("Case #%d: %s\n" % (case, s))
 
eatFile('A-large-practice.in','A-large-practice.out.txt')