These slides were part of one of the weekly Lunch and Learns at Acquia. A small comparison of old testing methodology (Test-Unit and Selenium) to something we tried on Drupal Commons.
The PDF version of the talk is available for download over here.
These slides were part of one of the weekly Lunch and Learns at Acquia. A small comparison of old testing methodology (Test-Unit and Selenium) to something we tried on Drupal Commons.
The PDF version of the talk is available for download over here.
I’ve recently been dabbling with setting up a little homeserver. It runs XBMC, afpd (for TimeMachine) and a good amount of other little scripts and apps that mike my life more automated.
One of the things I would like to have is the ability to access US only services like Hulu from within XBMC.
From the XBMC side, that isn’t all that hard of a task. There are plugins for hulu (video) and the online portfolio of various cable stations (video) available from bluecop’s repository. They certainly aren’t giving the user an experience that is up to par with something like the interface of an Apple TV, but it usually works without too much of a hassle.
One of the problems when setting up this combination is the geo-locked nature of hulu and the other providers. When visiting the Hulu website from my usual German IP address, I am greeted with the usual “NO VIDEO FOR YOU!” message:

To get arround this, I’ve used VPNs or specialized services in the past. While both of them work pretty decently, I’d rather not force ALL of my traffic over the VPN or pay for a service that I can’t use for much more than Hulu.
One solution would be to go down the VPN route and configure network access based on the user or group using iptables’s owner-match extension, but I honestly don’t like working with iptables and the extension isn’t necessarily available on all systems.
Thanks to @makefoo, I looked a bit more into available “socksification” tools. These tools basically hook TCP/IP kernel methods and redirect them over a SOCKS proxy on a per application level using LD_PRELOAD as far as I understood. This means that you can use them on a per-application level and the only thing you need to point them at is a SOCKS proxy. A SOCKS proxy like the one that SSH is able to provide with the -D flag. So the only real setup I have to do is establishing an SSH connection before I launch the app using something like:
ssh -ND 8765 -i /path/to/certificate [email protected]
Given that you set up a ‘user’ account on your server (.bin/false or /bin/nologin are your friends) and have public key authentication enabled, this will open a local socks proxy on port 8765 and is able to dynamically forward all requests ports through that connection. There are several tools that can do the actual redirection of the network requests. I personally have had good luck with ProxyChains. Other alternatives are TSocks or Dante.
Another big advantage is that this doesn’t need anything running on the remote server besides SSH. I suggest looking at current LowEndBox offers for a cheap VPS. I currently use the “Atlanta OpenVZ VPS - OVZ128” from Quickpacket which comes down to 15 USD a year. I had to ask them for another IP once because the first one wasn’t for some reason detected as being from the US, but besides that it worked great.
If you’re looking for solutions to proxy your Bittorrent traffic, I suggest using Deluge Torrent which supports SOCKS without the need for forced socksification. And at least for Germany, Oderland is a nice swedish VPS provider that has a VPS starting at 2-3 Euros/month.
Thanks to this, I can now do all of my backups straight over my regular connetion and specific programs will use the SSH encryted connection. With my AMD E-450 CPU, I can push 100 mbit/s transfer speed to the internet without a problem.
I recently switched from the HTC Desire to the iPhone 4s and I’m pretty happy so far. The things that usually use on my phone and that I have to look for on the Apple app store are:
The podcasting client was easy, I’ve already used instacast on my iPad, it syncs with iCloud and works perfectly for what I need.
This post deals with the second app, the running app.
When I was on Android, I usually used runkeeper. It worked fine and the only downside was that I had to go to the website to get the GPX file (and they tried to hide it pretty well). On iOS, the app seemed a bit… jumpy when it comes to filtering the GPS signal:

This wasn’t really what I was looking for.
I also tried a few other ones, but most of them where targeted towards getting you on some website and wanting you to buy some sort of premium subscription.
I looked for a paid app that isn’t free but offers good value, this is where I noticed Runmeter:

The company that develops it has a nice comparison online. While this has to be taken with a grain of salt, I think they did an ok job.
Things I like:

So far I am happy with the app, it’s actively being developed and the price of 4.99$ is ok for something that I use every day.
–> App store link
Collected enough good stuff again :)
When trying to run a test-unit test with the included XML testrunner on 1.8.7, I ended up with a NameError about a missing “TestResultFailureSupport”:
1 2 | |
To solve this, you have to make sure that the file actually loads the test-unit 2.x GEM as opposed to using the included 1.x version from stdlib. You can do this by simply adding this line to your ruby file:
1
| |
It’s another one of those blogposts… :)
I was a bit fed up with having to keep a whole software stack (mysql, apache, varnish, …) on my VPS up to date while just serving static content (comments via disqus).
When Werner Vogel’s blopgpost ”No Server Required - Jekyll & Amazon S3” popped up in my feed reader, I decided to spend a few hours fiddling with a quick and dirty migration attempt.
Thanks to the wonders of open source, migrating my blog from drupal to octopress was relatively easy.
I had to change some minor things in the migration script and I was ready to go. I hope to parametrize my changes correctly and submit a D7 compatible version of the script to the octopress github repo on one of the upcoming weekends.
The next steps will be:
Fun times ahead :)
The disqus module allows the usage of drupal with the disqus commenting system.
Since I recently migrated, I’d love to be able to:
a) keep all of my links the same
and
b) have all the old comments show up on the new site.
Problem a) can be solved by simply using the pathauto module and some minor tweaking wherever needed.
Problem b) needed some hacking for me.
I always used the alias (blog.marc-seeger.de/year/month/day/slug) as an identifier on disqus. The durpal module, by default, uses the drupal node ID (blog.marc-seeger.de/node/123) as the identifier.
It’s easy enough to make some small changes though. All of this is in the disqus.module file. Here is the original passage that sets the disqus URL:
1 2 3 4 5 | |
Just change the ‘alias’ parameter to false to get your aliased path as the disqus URL:
1
| |
This tells the url() function to NOT assume that the alias is already resolved.
The API for the url function describes it as “Whether the given path is a URL alias already.”
The second thing you have to change is the disqus identifier. Also in the disqus.module search for this:
1 2 | |
and replace it by:
1 2 3 4 5 | |
Worked for me :)
When trying to watch a TV show on hulu (u.s.) or iplayer (u.k.) from inside Germany, one is usually greeted with messages like these:
iPlayer:
Hulu:
These services usually use your IP address to determine what country you’re from. An obvious solution would be to just run the whole traffic over an HTTP proxy that is standing inside of the country in question. The problem is that while browsers tend to honor HTTP proxy settings, the flash player will try a direct socket connection first. This could be circumvented by blocking ports, but that is one of the more annoying solutions to the problem.
Something interesting can be seen by looking at how the iPlayer does the geo locating. It will check the IP and, if successful, pass out the URL for the actual streaming video. This URL can be accessed from anywhere, the only problem is to somehow get at it.
While VPN solutions work, they usually will tunnel ALL of your traffic over the comparatively slow VPN connection, will require manual enabling/disabling, won’t work with e.g. the apple tv out of the box and are in general a pain to set up. If you want to go this way, I recommend a look over to lowendbox.com for matching VPS systems or at one of the many commercial VPN providers which are usually more expensive than setting it up yourself.
I recently came across a pretty interesting service that has a different approach to this problem. The service is Unblock US and they provide a DNS based solution to the whole ‘geolocation-check’ topic. After you signed up (free 1 week trail without payment details) you’ll have to use their servers as DNS servers.
What they will do is redirect all DNS requests to geo-location checks to their own IPs where e.g. a squid server will forward the connection with an IP address that matches the country in question (e.g. the US for Hulu and the UK for iPlayer). The advantages of this approach are:
Only the necessary traffic will run over the slow proxy. Most of the time, the real video will come directly to you via your regular internet connection
You can just put the DNS servers into your router and all of your devices (iPad, AppleTV, Laptops, … ) will be able to automagically use the geo-restricted services
While the service provider might redirect any website to their servers, they still can’t fake an SSL certificate, so anything important should still be safe (you hopefully ARE using SSL/TLS!)
In contrast to a VPN solution, this allows you to access services from more than just one country (e.g. Netflix from the US, iPlayer from the UK, TruTV from Germany, TF1 from France)
The price for the service isn’t too bad either. When prepaying for a year, it will come down a little bit less than 3 Euro/month. Monthly payments will be approximately 3.50 Euro/month.
A downside of this approach is, that they have to ‘whitelist’ services and figure out which URLs/Domains are responsible for the GeoIP checks. With a VPN, you can use ANY service within that country without further actions.
While I haven’t signed up with them so far, I’m seriously considering it once I have some free time on my hands to actually watch all the tv and movies.
First of all: This is a bad idea in general since you shouldn’t use class variables in ruby.
But just in case you ever need to use them and would like to access them using a getter method, this is how it can work:
1 2 3 4 5 6 7 8 9 | |
This is a bit of magic and even has an eval(), but it works…