Recently, a Maplins kit of all sorts of LED segment displays and a LCD screen came into my possession, a fairly interesting array of components are in this bag, so I started to play around with them as there was no instruction manual.

Here’s the kit if anyone’s interested in picking one up:

Counting Devices on the Local Network and Displaying Them on Our Display:

So, with little knowledge of the GPIO ports or their correlation with raspbian’s gpio command line utility, I rigged up the 7-segment display to my Pi with the use of a breadboard and a gpio breakout cable, here’s a similar kit available from Adafruit: https://www.adafruit.com/products/914

Here’s my notes from plugging in the 7 segment display:

 

And here’s the final product:

(ignore the random transistor)

You can power either the 3rd pin or the 8th pin, depending on aesthetics, as you can see I chose the 8th pin. Remember to use a ±330ohm transistor between the 3.3v power pin and the 8/3 pin on the 7 segment display or you’ll blow it!

Now for the software side:

You’ll want to install the python Raspberry Pi GPIO command line utility via the following method:

apt-get update && apt-get install python-rpi.gpio arp-scan

Once this is finished, you can run the below (very simple, I just threw it together) bash script (use sudo!) which will show the number of devices on your network on your 7 segment display!

for i in 6 7 8 9 10 11 12 13; do gpio write $i 1; done
 while true; do
 case $arp in
 1 )
 if [ "$arp" = "1" ]
 then
 for i in 7 9; do gpio write $i 0; done
 else
 echo ""
 fi ;;
 2 )
 if [ "$arp" = "2" ]
 then
 for i in 8 9 10 11 12; do gpio write $i 0; done
 else
 echo ""
 fi ;;
 3 )
 if [ "$arp" = "3" ]
 then
 for i in 7 8 9 11 12; do gpio write $i 0; done
 else
 echo ""
 fi ;;
 4 )
 if [ "$arp" = "4" ]
 then
 for i in 7 9 12 13; do gpio write $i 0; done
 else
 echo ""
 fi ;;
 5 )
 if [ "$arp" = "5" ]
 then
 for i in 7 8 11 12 13; do gpio write $i 0; done
 else
 echo ""
 fi ;;
 6 )
 if [ "$arp" = "6" ]
 then
 for i in 7 10 11 12 13; do gpio write $i 0; done
 else
 echo ""
 fi ;;
 7 )
 if [ "$arp" = "7" ]
 then
 for i in 7 8 9; do gpio write $i 0; done
 else
 echo ""
 fi ;;
 8 )
 if [ "$arp" = "8" ]
 then
 for i in 7 8 9 10 11 12 13; do gpio write $i 0; done
 else
 echo ""
 fi ;;
 9 )
 if [ "$arp" = "9" ]
 then
 for i in 7 8 9 12 13; do gpio write $i 0; done
 else
 echo ""
 fi ;;
 10 )
 if [ "$arp" > "9" ]
 then
 for i in 12; do gpio write $i 0; sleep 0.5; gpio write $i 1; done
 else
 echo ""
 fi ;;
 esac
 arp=$(expr `arp-scan -l | wc -l` - 5 &)
 sleep 30
 for i in 6; do
 gpio write $i 1
 sleep 0.5
 gpio write $i 0
 sleep 0.5
 gpio write $i 1
 sleep 0.5
 gpio write $i 0
 sleep 0.5
 gpio write $i 1
 sleep 0.5
 gpio write $i 0
 for i in 6 7 8 9 10 11 12 13; do gpio write $i 1; done
 done
 done

You may have heard about DNS tunnelling before, it’s the process of encoding data and sending it to our chosen name server. The NS realises it cannot resolve the query and subsequently forwards it onto the tcp-over-dns server. The tcp-over-dns server then decodes the data we sent encodes the server’s data in the answer and replies to us, the client.

So how does this help me? Well, think of Hotels, Airports and recently Airplanes! They all charge users for internet usage, we can bypass this with the use of DNS requests to external hosts which most systems do not yet block (it’s as simple as implementing split horizon DNS yet hardly anyone has). DNS tunnels are rather slow, but allow you to reply to emails and browse simple pages whilst travelling, expect around 20KB/s.

Using Iodine:

Tools you’ll need:

  • Linux server
  • OSX Client computer
  • A domain

On The Server:

  • Install iodine with either aptitude [apt-get install iodine] or from source: http://dev.kryo.se/iodine/
  • Start the iodine daemon with:
    iodined -f -c -P [yourpassword] 10.0.0.1 [yourdomain]

Client Setup:

  • I used Mac OSX with homebrew installed which had the package already:
    brew install iodine
  • Linux users can simply
    apt-get install iodine
  • You also need to install TUN/TAP drivers for OSX: http://tuntaposx.sourceforge.net/

DNS Setup:

  • With your registrar, you will want to set up something similar to this:
  • tunnelhost     IN      A       10.15.213.99
    tunnel         IN      NS      tunnelhost.mytunnel.com

Final Stage:

  • Now to connect, use: 
    sudo iodine -f -P [yourpassword] 10.15.213.99 tunnel.mytunnel.com
  • If you have issues, try adding -T to the client parameters
  • You can now ssh -D xxxx [email protected] and use a socks proxy to route traffic through your DNS tunnel! Enjoy!

So, as per my previous post, OVH BHS Servers are being handed out to beta testers free to use until mid August 2012. I’ve been testing my allocated dev server for three days.

Now, let’s just go over those specs again:

  • 16 gb RAM – 2x8GB 1333 MHz Non ECC DDR2 Kingston modules.
# dmidecode 2.9
SMBIOS 2.7 present.
Handle 0×0029, DMI type 17, 28 bytes
Memory Device
Array Handle: 0×0026
Error Information Handle: No Error
Total Width: 64 bits
Data Width: 64 bits
Size: 8192 MB
Form Factor: DIMM
Set: None
Locator: SODIMM1Bank Locator: Channel A DIMM 0
Type: <OUT OF SPEC>
Type Detail: Synchronous
Speed: 1333 MHz (0.8 ns)
Manufacturer: Kingston
Serial Number: 4932BC05
Asset Tag: A1_AssetTa
gNum0
Part Number: 9905428-093.A00LF
Handle 0x002C, DMI type 17, 28 bytes
Memory Device
Array Handle: 0×0026
Error Information Handle: No Error
Total Width: 64 bits
Data Width: 64 bits
Size: 8192 MBForm Factor: DIMM
Set: None
Locator: SODIMM2
Bank Locator: Channel B DIMM 0
Type: <OUT OF S
PEC>
Type Detail: Synchronous
Speed: 1333 MHz (0.8 ns)
Manufacturer: Kingston
Serial Number: 3A32A802
Asset Tag: A1_AssetTagNum1
Part Number: 9905428-093.A00LF
  • 1tb hdd — On further inspection, 2x 1Tb HDDs in RAID 1, good for drive redundancy!
Attached devices:Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: ST1000DM003-9YN1 Rev: CC4H
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi4 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: ST1000DM003-9YN1 Rev: CC4H
Type: Direct-Access ANSI SCSI revision: 05
root@ns4000569:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md1 10G 844M 8.7G 9% /
tmpfs 7.8G 0 7.8G 0% /lib/init/rw
udev 10M 172K 9.9M 2% /dev
tmpfs 7.8G 0 7.8G 0% /dev/shm
/dev/md2 921G 7.0G 868G 1% /home
  • 100mbps connection — IPerf test from OVH France (Kimsufi box) resulted in 87.1Mbps, feel free to trace-route 198.245.62.123
  • Quad Core Intel(R) Core(TM) i3-2130 CPU @ 3.40GHz
  • Running Debian Squeeze by default (6.0)
  • 1 IPv4 Address
  • /64 subnet of IPv6 addresses (standard with every OVH server)
All in all, I can vouch for OVH as a whole for excellent uptime, a decent network (I have had 0 network downtime for over 6 months with OVH France on my kimsufi server), excellent support and a easy to use, functional management panel. I will update this post if I have any more findings and once I start running some services on this server I will comment on more in-depth performance.

 

So about two weeks ago I signed up with OVH.net for one of their beta servers, OVH have built a huge new data centre on the border of the USA and Canada (probably because Canada is french speaking). This datacenter is HUGE, housing around 360K servers. Anyways, OVH assign around 90 beta servers every weekday for testing. You can get your own by following #OVH on twitter and checking their tweets at around 6AM GMT+1. Here are the stats of the dedi I received today, I hope to put it to good use (suggestions in the comments if you have any)!

  • 16 gb RAM
  • 1tb hdd
  • 100mbps connection
  • Quad Core Intel(R) Core(TM) i3-2130 CPU @ 3.40GHz
  • Running Debian Squeeze by default (6.0)
  • 1 IPv4 Address
  • /64 subnet of IPv6 addresses (standard with every OVH server)
  • Free to test till Mid August!

So where does OVH stand in relation to other online retailers/hosts?

Google: 1 million+ servers
Microsoft: 500k servers
OVH: 100,000 servers + 360,000 servers
HP: around 300k servers
SoftLayer: 100,000 servers
Akamai Technologies: 95,000 servers
Amazon: undisclosed, certainly > 70k servers
Rackspace: 78,717 servers
Intel: 75,000 servers
1&1 Internet: 70,000 servers
Facebook: 60,000 servers
LeaseWeb: 36,000 servers
Intergenia: (PlusServer/Server4You), 30,000 servers
SBC Communications: 29,193 servers
Verizon: 25,788 servers

Well, the other day Apple announced their new MacBook lineup for 2012, and I must say it was a little bland, no radical new design for the unibody MBPs for over 5 years now. But they did introduce their thinner Macbook Pros with a super high resolution screen at 2880 x 1800 pixels large. The new Ivy Bridge processors should also aid power consumption and give the notebooks a 20-30% performance increase. I’m pretty amazed at how they fit that much into such a small (0.71 inches thin) and light (just over 2KG) notebook for it’s power. But what’s my real opinion then? Well for starters I think it was a bad move to solder the RAM and Flash memory to the motherboard, leaving us consumers fucked if we want to ever upgrade such components, seeing as apple’s RAM and Drive prices are extortionate already, I would have personally liked to see apple leave these components the way they should be. Alas, the notebook is extremely thin so I do wonder if it would even be possible, what with the larger battery pack to power that gorgeous display.

So, despite its two downsides, I’m going to be getting one. Why? I’ve promised my little sister my current laptop. What specifications will I be getting and how will I justify these specifications?

  • 2.6 Ghz i7 Well, i’m off to a bad start, because I cannot justify a 2.6Ghz processor over a 2.3. However, I /have/ to go with this to allow for more flash memory.
  • You guessed it, more flash memory, 512GB, why over 256? Because I do not own a Thunderbolt OR USB Hard drive, and never plan on doing so, I use network attached storage for backups and music/video streaming, that’s all really, so I’ll want enough storage space for all my documents and projects without having to plugin in a shitty external storage device. My NAS will do just fine for other media.
  • 16GB RAM. Why? Because I have 16GB on my desktop, and no, I haven’t used it all yet, but I’m getting ever closer with the more work I do. I also sit on IRC a lot and have huge scroll backs on my terminal windows. I also plan on running at least one BSD virtual machine whilst on the move.
  • Why go for the latest generation? Because of it’s weight, the reason I don’t have a macbook pro now is because they are bulky and heavy, I travel every day and have had a 15″ notebook before, not good on the back.

So my nearest Apple shop has em in stock today, I aim to pick one up on Friday, based on real world performance I see in the store.

Well, I’ve finally gotten up off of my arse and done it. I’m going to start a blog.

What do I want to achieve from this? I don’t really know, perhaps it will help me document my progress in life etc.. I would like to point out that I will be expressing my somewhat keen opinions on perhaps touchy subjects. Although I have not set this up to directly offend people, if you do take offence to my posts, get in touch.

So, the web server is all set up, IPv6 configured, CloudFlare enabled (pretty sweet service so far), Amazon S3 CDN for media set up and my previously half-arsed php-fastcgi configuration is now reworked. First page load time is averaging 3 seconds and second load is under 1 second, I’m ok with this.