Showing posts with label geek. Show all posts
Showing posts with label geek. Show all posts

Friday, 16 June 2017

Streaming from CICS 5.4

So today (16th June 2017) marks the general availability of CICS TS v5.4.  So considering it was a Friday I thought I would take some time to build a quick project using the latest release of CICS and CICS explorer.

Earlier in the week Fraser Bohm and Andy Bates had been involved in a webcast outlining the new technology in the latest release.  After a brief prompt by colleague David Harris and some conversation with Chris Philips we decided to see how easy it would be for the latest version of CICS to stream a video about itself. 

We grabbed the recording of the CICS 5.4 web cast and stored it in a zfs file on the mainframe, started a CICS region and the explorer and started to build



For those interested the small bundle project that I created here is available on github.

Thursday, 2 January 2014

Taking back the web

Back in the good old days when your modem only supported 28.8kbps and accessing the local BBS didn't allow you to 'like' posts, there weren't the rich services that we no benefit from such as free mail, cloud storage, hosting etc.  If you wanted any of the above you had to build a server yourself.  These servers were big grey boxes with large monitors.

Now in 2014 I have decided to build a server myself and use it to host 'something'.  This is itself isn't a real technical challenge.  Most modern linux distributions allow the user to install a preconfigured LAMP stack with a single command.  Neither is building a web site, thats just a bunch of HTML, CSS and other scripting languages.  I however want to do this for NO MONEY!  I will only use hardware and services that I have either had donated or have free options.  The point of this is that to prove that anyone with a bit of knowledge can 'take back the web'  by building the infrastructure and hooking it up to the rest of the internet. This post consists of 2 parts:

  1. The web server
  2. Domains / DNS and port forwarding.
At the end I will have a basic HTTP server running on some hardware and available on the internet.  Future posts will discuss the services I will build on this stack.

The web server

I like my smartphones, for the past 2 years I have had a Samsung Galaxy Nexus.  I love this device.  It was my email, calendar, music, communication device and it went everywhere with me.  Over Christmas I upgraded to a Nexus 5 and for the first time felt a pang of pain as I removed the SIM from my old device and turned it off for the last time.  I have never felt like that before with some electronics.  Deciding to turn it into a web server somehow eased the pain and is a nice example of upcycling a device.  In some ways it is a great choice:
  • Silent running
  • low power consumption
  • Small physical footprint
It's not going to be able to serve the next facebook or wikipedia. but to host some personal stuff it works absolutely fine.  If I ever require something with a bit more capacity then I can always find some other devices and use them as database servers or content servers to lighten the load.

I am using a web server called kWS which is free in the play store.  it is just a basic HTTP server with pro features in the paid version.  Right now it fits my requirements as in it serves basic HTML and is free.  Later on I might need to change to a different server.

Because I have not rooted my android device I am not allowed to bind to any port running <= 1024 so therefore I am using port 8080.

Domains / DNS and port forwarding

I don't have my own domain and buying one would be outside of the rules so I have used the free service of:
www.noip.com which provide a free dynamic DNS service.  They host the domain and I am allowed to update the associated IP address using a small client running either on my ADSL modem router or on my web server.  

My router (provided by sky) only supports dynamic dns updating if you are using the dyndns product.  However this is no longer free.  I am using a small client that sits on my android web server and uses the no-ip.com api to update the DNS record.  I am not expecting the external DNS to change much, but if it does I am covered.

Finally I just needed to reserve an IP address for the MAC address of my phone ensuring that my new web server always gets allocated the same IP address.  One small hole in the firewall allowing inbound traffic on port 8080 to go to the IP address on my phone and I was all ready.



The site http://hobbit1983.no-ip.biz:8080/ is now live and running from my smartphone!

Monday, 29 April 2013

Connecting a kindle to a linux machine

I have a 50mb pdf that I want to read on my kindle.  I cannot use the email to whispersync bridge that amazon provide as the 50mb attachment is too large.

I tried to connect the kindle to my linux laptop and apart from the kindle charging there was no recognition in KDE that I had plugged a device in.  A quick google later discovered that the kindle uses the MTP protocol rather than Mass Storage Device Class protocol like most other USB devices.  Installing MTP support is easy:

sudo apt-get install mtpfs

Plugging in the kindle now gets KDE all excited and allows me to view the content.

Except after unmounting the kindle I couldn't see the PDF on the menu screen.  I re-attached my kindle to the computer and could see the file still there, so why didn't the kindle like it.  The file I copied was called:

10_PRINT_121114.pdf

After renaming it to:

Print Code.pdf

It started to show on the kindle screen.  All I can think of is that the kindle doesn't like files that either start with a numeric or have a '_' character in their names.  After some more renaming I can conclude:
The kindle doesn't like underscore characters in file names.  I ended up just changing the "_" to a " " and everything works fine now.

For those interested the book I am copying to the kindle is called:

10 PRINT CHR$(205.5+RND(1)); : GOTO 10

From 10print.org.  This book tells the story of computer code in society and culture through the lens of a single line of C64 basic code.


Friday, 26 April 2013

Writing my first program (Again)

The first program I ever wrote was on a commodore 64 computer.  Since my wonderful wife has managed to buy me one I decided to write my first program again.  Here is the source code:


I had no spare tapes to save my work so I had to take a picture!  The program started out in the usual style as a "Hello World" program.  I then hacked around and changed a few bits and eventually ended up with the above.
So what does it do? - well THIS:



Yes I know its simple, egotistic and self promoting, but I don't care.  The amount of enjoyment I got from doing that is huge.  20 years ago when I wrote a program for the first time I could save it on a cassette tape.  Where on earth am I going to find one of them in 2013???

I have found some good resources online that helped a lot when building this program.
A list of memory address that can POKEd
An e-book about an awesome line of code!
A wiki page detailing the VERBS in the version of basic installed on the commodore
An online version of the C64 Manual

Retro Geek

I am the luckiest man alive.  Not only does my wife acknowledge that I am a geek and have an unhealthy obsession with computers but she feeds this geek behaviour with some outstanding presents. However she has outdone herself this time as she has bought me a commodore 64.


It was meant to be a Christmas present for me.  However the guy that sent it didn't wrap it and as I answered the door when it arrived the cat prematurely escaped from the bag.  The commodore 64 was the first computer that I owned.  We did used to have a dragon as well, however that was more my dad's computer.  The commodore was just mine.  I learnt a lot about computers from that machine, from how a light gun worked through to how data was stored and some very basic programming.  That machine will always be special to me.  To have one now at the age of 30 is incredible.

I took it to the local maplins store, where a huddle of geeks clustered around me and the commodore, admiring it's good condition and asking to have their photo taken next to it.  The store manager even walked out of the store as I entered asking if the box truly contained that which was advertised on it.  We needed to go to maplins to purchase a RF cable to connect the Commodore to my LCD TV.  Naturally this being maplins they knew exactly what I needed and passed it to me.  We took it home and started the unboxing.

Like I said the box was not wrapped when it was sent so it was COVERED in parcel tape.  This is annoying.  The original box is part of the vintage retro feel.  5 minutes of painstaking picking and pulling and the unboxing could commence.


Once unboxed and all connected up the fun could start.  I found that my TV needed to be tuned to 590Mhz to pick up the output from the computer.

Amy graciously allowed me to then spend the whole evening playing vintage games.  Working out that a light gun will not work on a LCD screen (It uses cathode ray gun timings, which of course, are not available on a LCD screen), getting beaten by her on Mike Reids pop quiz etc etc and writing my first program (again)

Thank you to Amy for allowing me to geek out for the evening and re-live my childhood again.  It is a wonderful gift that I will never forget.