Blog

Adding an SSD to a Lenovo X200t while keeping the harddrive

I was thinking about buying an SSD for my X200t for quite some time, but never wanted to replace the HD by an SSD. I always wanted SSD and HD to coexist, which is a bit problematic in a laptop that doesn't support mSATA. Furthermore, I've got integrated WWAN, so I wanted to keep that as well.

Finally, I came up with the following solution, which works perfectly fine, apart from hardware RFKill switch:

  • Replace the WiFi module by Half Mini Card and move it to the spare TurboCache slot
  • Use a SuperTalent CoreStore SSD for System partition

There are, however, two drawbacks: One must patch the BIOS for the Thinkpad to boot with the unauthorized card (did that myself) and Pin 20 on the card must be taped for wireless to function.

The system cannot boot from the CoreStore SSD. Instead, I've got GRUB on the HD, but system root on the SSD. So, the only part that is read from the HD are bootloader and kernel. I cannot (and don't want to) boot Windows from the SSD.

While upgrading, I also replaced the never correctly functioning Ericsson F3507g by a Huawei one - a half mini card. My first intention was to move the Huawei card to the half mini slot and keep my WiFi card, but the only port where the SIM card connections go to is the WWAN slot.

→ Read more...

2015/02/20 14:07 · Andreas Böhler

Download an entire Picasa Web Album in Full Resolution

I'm on Linux and Google stopped developing Picasas for Linux (well, they never did, they just had the Windows version running under Wine). Nevertheless, I wanted to download a complete Web Album in the highest possible resolution.

Unfortunately, Picasa has recently changed the URL structure, so that the trick with DownThemAll and the RSS feed does not give you the full size anymore. Here is a simple, but ATM working, solution: Click on the RSS link as usual, but don't use DownThemAll. Instead, save the page as HTML. If you open the file in a text editor, it's one very very very long line of HTML code. Now comes the fun part: A simple Python script that parses all URLs, replaces the size restriction but the full size URL and downloads the pictures.

#!/usr/bin/env python2

import sys
import urllib

def download(url):
    webfile = urllib.urlopen(url)
    localfile = open(url.split('/')[-1],'w')
    localfile.write(webfile.read())
    webfile.close()
    localfile.close()


if len(sys.argv) < 2:
    sys.exit()
    
fn = sys.argv[1]
fp = open(fn, 'r')
content = fp.readline()
contents = content.split("><")
count = 0
print len(contents)
urllist = []
fnlist = []
for line in contents:
    if line.startswith("media:thumbnail"):
        url = line.split(" ")[1].split("=")[1][1:-1] # Ugly, but seems to work
        print "Found Picture: " + url
        fname = url.split("/")[-1]
        if fname not in fnlist:
            fnlist.append(fname)
            urllist.append(url)
            
print "Found " + str(len(urllist)) + " Pictures, downloading them now in Full Resolution, if possible..."
for url in urllist:
    dlurl = url.replace("s288", "s0")
    dlurl = dlurl.replace("s72", "s0")
    dlurl = dlurl.replace("s144", "s0")
    print "Downloading " + dlurl + "..."    
    download(dlurl)

Maybe it's usefull for someone…

2015/02/20 14:03 · Andreas Böhler

Multiple consecutive redirects using a JavaScript Popup

In project.net, the project management application we are using, you can't directly link to e.g. a discussion group. You have to click on the respective business, then on Discussions and afterwards on the group itself.

In order to automate this, we created a link to a JavaScript popup that then redirect to one page after the other. The relevant code is the following:

function pop_redirect() {

 attr = 'resizable=no,scrollbars=yes,width=150,height=100';
 popWin=open('', 'new_window', attr);
 popWin.document.write('<head><title>Test Popup</title>');
 popWin.document.write('<scr'+'ipt language="JavaScript">');
 popWin.document.write('function last_redirect(){\n');
 popWin.document.write('if(opener && !opener.closed){\n');
 popWin.document.write('opener.location.href="http://last_url.com";\n');
 popWin.document.write('window.close();\n');
 popWin.document.write('}\n');
 popWin.document.write('}\n');

 popWin.document.write('function redirect2(){\n');
 popWin.document.write('if(opener && !opener.closed){\n');
 popWin.document.write('opener.location.href="http://second_url.com";\n');
 popWin.document.write('setTimeout("last_redirect()", 500);\n');
 popWin.document.write('}\n');
 popWin.document.write('}\n');

 popWin.document.write('function redirect_board(){\n');
 popWin.document.write('if(opener && !opener.closed){\n');
 popWin.document.write('opener.location.href="http://first_redirect.com";\n');
 popWin.document.write('setTimeout("redirect2()", 500);\n');
 popWin.document.write('}\n');
 popWin.document.write('}\n');
 popWin.document.write('setTimeout("redirect_board()", 500);');
 popWin.document.write('<\/scr'+'ipt>\n');
 popWin.document.write('</head>\n');
 popWin.document.write('<body onload="redirect_board()">');
 popWin.document.write('Processing done...Please wait.<br>If it does not work, click <a href="javascript:redirect_board()">here</a>');
 popWin.document.write('</body>');
 popWin.document.write('</html>');
 }

And the relevant link is just a javascript link using

<a href="#" onClick="board_redirect()">Redirect Me</a>

Update: The following accepts an array of URLs to cycle through:

function redirect(urllist)
{
 attr = 'resizable=no,scrollbars=yes,width=150,height=100';
 popWin=open('', 'new_window', attr);
 popWin.document.write('<head><title>Redirecting...</title>');
 //popWin.document.write('</head><body>');
 popWin.document.write('<scr'+'ipt language="JavaScript">');
 popWin.document.write('var urllist = new Array(' + urllist.length + ');\n');
 for(i=0;i<urllist.length;i++)
 {
 popWin.document.write('urllist[' + i + '] = "' + urllist[i] + '";\n');
 }
 popWin.document.write('function redirect(i){\n');
 popWin.document.write('if(i == urllist.length){\n');
 popWin.document.write('window.close();\n');
 popWin.document.write('}\n');
 popWin.document.write('else {\n');
 popWin.document.write('if(opener && !opener.closed){\n');
 popWin.document.write('opener.location.href=urllist[i];\n');
 popWin.document.write('i=i+1;\n');
 popWin.document.write('setTimeout("redirect(" + i + ")", 500);');
 popWin.document.write('}\n');
 popWin.document.write('}\n');
 popWin.document.write('}\n');

 popWin.document.write('<\/scr'+'ipt>\n');
 popWin.document.write('</head>\n');
 popWin.document.write('<body>\n');
 popWin.document.write('Processing done...Please wait.<br>If it does not work, click <a href="javascript:redirect(0)">here</a>\n');
 popWin.document.write('</body>\n');
 popWin.document.write('</html>\n');
 popWin.onload = popWin.redirect(0);
 }

And then call it using the following statement:

<a href="#" onClick='javascript:redirect(["http://www.google.at", "http://www.gmx.at", "http://www.facebook.com"])'>Redirect</a>
2015/02/20 14:01 · Andreas Böhler

Genua

Gestern war ich zum zweiten Mal in Genua. Diesmal aber mit Anna, Marie-Elise und Stefan. Zunächst gingen wir durch die Stadt und besichtigten San Lorenzo. Nachdem wir erst gegen Mittag eintrafen, hatten wir schnell Hunger und gönnten uns eine “farinata” sowie eine “forta di bietole” in einem kleinen Laden, den der französische Reiseführer von Marie-Elise vorgeschlagen hatte. Eine gute Wahl!

Anna, Marie-Elise und Stefan beim Essen

Nach dem Essen besichtigten wir noch den Palazzo Reale (der verglichen mit dem Palazzo in Turin gar nichts für sich hatte) und das Aquarium (welches wirklich beeindruckend war!).

Es stellte sich heraus, dass es eine wirklich gute Übung ist, den ganzen Tag auf italienisch zu kommunizieren, auch wenn keine Italiener dabei sind (Marie-Elise ist Französin)! Man ist doch gezwungen, sich alles auf Italienisch zu überlegen und mit der Zeit funktioniert das wirklich gut.

Allerdings hatten wir diesmal Pech mit dem Wetter: In Genua hatte es in letzter Zeit zumeist +15°C bei Sonnenschein - diesmal nicht. +7°C und Regen (während in Pavia die Sonne gescheint hätte). Tja…

2015/02/20 14:00 · Andreas Böhler

Turino / Turin

Turin ist nicht nur Sitz von Fiat, sondern beherbergt auch das zweitgrößte ägyptische Museum der Welt. Tatsächlich machten wir an diesem Tag (=Anna, Bernhard und ich, genau wie am Vortag) einen wahren Museumsmarathon: 4 Museen innerhalb von 6 Stunden. Nun aber der Reihe nach:

Wir kauften uns, obwohl wir nur einen Tag hatten, den Zwei-Tages-Pass, dieser zahlt sich ab 3 besuchten Museen aus. Als Erstes gingen wir ins museo civico, untergebracht in einem castello, das mehrmals umgebaut wurde. Als Zweites gaben wir uns das Kino- und Filmmuseum, das in einem eigentlich als Synagoge konzipierten Gebäude untergebracht ist. Die Kuppel läuft Spitz zu (in ca. 80m Höhe) und hat noch eine ebenfalls ca. 80m hohe Stahlkonstruktion aufgesetzt. Mit dem Lift kommt man bis auf die Spitze der Kuppel in 86m Höhe.

Blick auf die Kuppel von Innen Blick über Turin. Ganz schön nebelig!

Nach diesem beeindruckenden Museum folgte noch die Besichtigung eines Palazzo und abschließend das ägyptische Museum!

2015/02/20 13:58 · Andreas Böhler
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies