Thursday, 9 April 2015

Access 2010 - Report text truncated when exported to text file

I have an MS Access report that looks fine in View mode and exports as a PDF with no problems but when exported to Text file some of the text gets truncated. When viewed in vim it seemed like the truncation was happening at the 140 character mark with a newline added and some characters missing before the rest of the text continued on the next line.

Very strange.

Did a google search and found nothing useful.

The fact that the truncations were all at the 140 char mark seemed weird but seemed to point to a width issue. So I made the report wider and increased the width of the text boxes. Problem has resolved with the text now displaying as expected and newlines being added in sensibly at word breaks in the text.

My guess: page setup was using landscape mode, report width well short of landscape width and so text was hitting the report width before the page width and the text wrapping algorithm wasn't kicking in in time and so a brute-force linebreak was happening. Increasing the report width to be in alignment with the landscape width is now allowing the text wrapping to work as it should.

Monday, 5 May 2014

Google map rendering problem

To self: Next time google map tiles don't display properly in a Plone site page (or anywhere actually) - check to see if you have set the width and height for the map container.

*doh*

Tuesday, 29 April 2014

Setting up a VNC Server on a CentOS 6.5 NeCTAR instance

How to get a GUI interface to a virtual machine. These instructions are written for the NeCTAR Centos 6.5 image.

Tuesday, 4 February 2014

Script for publishing ingest status

There are two scripts:
  • rdsi_ingest.sh - output is in TiB
  • rdsi_ingest-iso.sh - output is in TB
Both scripts use df -P --total to get data from the system. rdsi_ingest.sh uses the -h flag to get output in TiB and rdsi_ingest-iso.sh uses -H to get the TB iso output.

Reminder for next time I need to find the right cron file:

The cron job to run the ingest status scripts was set up on login2 (shows up as n030 when logged).

Monday, 16 December 2013

8 Weeks without D: Week 6

Days 26-30: 16-20/12/2013

Monday morning

  • J back from holidays for a week. He has noticed that a new service is down and he doesn't have access to the machine to restart. Restart machine and add J to access list.
  • F arrives in office; Portfolio site down again. Restart system - all good for about 2 minutes and then stylesheets and images stop being served. No useful log messages that I can find. Spend 30 minutes trying to work out what is wrong - no luck. Give up and restart web server in desperation - all good.

8 Weeks without D: Week 5

Days 21-25: 9-11/12/2013

Week of the Plone update: all went well

Also the week I have been diagnosed with hypertension and placed on medication.

Some shibboleth configuration files needed updating.

Don't think I had to restart the portfolio site but can't remember for sure.


8 Weeks without D: Week 4

Days 16-20: 2-6/12/2013


All a blur - no memory of disasters......

Monday, 2 December 2013

8 Weeks with out D: Week 3

Days 11-15: 25-29/11/2013

It's all becoming a blur - days are blending into one another. Must remember to keep better notes....

Finally decided I'd better do some research on the system patching that is coming up. There are 18 sites that need to be patched, consisting of 7 different versions of the software of which only 1 is at a check point version.

At this point I'm just hoping that everything goes smoothly!

Oh - and D is the fire warden for our section of the building and they have decided to have the annual fire drill next week. So I have been nominated replacement fire warden until D returns from leave. Red cap and fluro safety vest look quite fetching.

Tuesday, 19 November 2013

SSHFS on OS X

A while ago I set up sshfs on my iMac and created an Automator script for easy of use. As I had never used Automator before, I did a bit of web searching for instructions and found this blog to be really useful - thanks bhfsteve!

8 Weeks without D: Week 2

Day 6: Monday 18/11

  • Research Centres & Institutes site stopped responding- Nginx webserver returning 504
    • User rang my office phone at 1:52pm - unfortunately I was at lunch and then a meeting so I didn't get back tot he office until around 3pm. 
    • Checked logs - no indication of what went wrong in the places I looked so did a service restart. System came back up fine and the service was restored.
  • Set up nagstamon on my workstation - now seeing alerts and warnings for all systems.

Day 7: Tuesday 19/11

  • F arrives at office at 9:15am: RSS feed has stopped showing on the Portfolio site. This feed comes from a main corporate site which underwent a redesign over the weekend.
    • Found URL for the feed and checked it - feed is empty.
    • Emailed URL of the feed to F who will follow up with relevant unit.
  • Noticed Research Portfolios site was returning a 504 (10:30am)
    • Again no  indication of cause in the logs
    • Restarted service - all good now.

Day 8-10: 20-22/11

  • No disasters! 
  • All quiet on the western front.

Friday, 15 November 2013

8 weeks without D: Week 1

Okay, so the main developer/sys administrator, D, is away for 8 weeks - and we get to mind the shop without him. He left us lots of instructions and assured us we would be fine. Us - well there are two of us (me and J), except one of us (J) will be also away for four of those weeks. So for four weeks it will just be me...

So I thought I'd keep track of any issues that occurred while D was away so I can report accurately when he returns.


Friday, 4 October 2013

Getting autofs working on a Centos NeCTAR vm


So I have to set up a web server on a NeCTAR vm to allow public access to some research data that is sitting on RDSI storage in the QCIF UQ node. The node support team requested that instead of just NFS mounting the data storage to the vm, it would be preferable to use autofs to mount the filesystem.

I'm not a sys-admin type - mostly my linux environments are all set up for me so this was a bit of an adventure. I had quite a few problems so, with the aim of helping out future non sys-admin types in the same position, I thought I should document what I had to do.

Tuesday, 24 September 2013

Fix for disappearing records in ReDBox


Post upgrade to 1.6 we have had problems with records "disappearing" when progressing through the workflow. This has happened with records created in the previous version that have been sitting in "Investigation" or "Metadata Review" stages. To fix, edit the .tfpackage file for the appropriate record and add in the following after the metadata array:

    "packageType": "dataset",
    "viewId": "default",
    "known_ids": "<redbox_record_id>"

Wednesday, 30 November 2011

Something for next time

Remember, if you change something in a buildout script - rerun buildout if you want the change to have efffect.

Tuesday, 30 August 2011

Vim Stuff

Add/Delete indent

When in insert mode,
  • CTRL-T increase indent by one shiftwidth
  • CTRL-D decreases indent by one shiftwidth

Word completion

keystrokesaction
^x^nword completion
^x^lline completion
^x^ffilename completion

Exuberent Ctags

keystrokesaction
Turn on taglist
:TlistAddFilesRecursive *.Add files recursively e.g. :TlistAddFilesRecursive ~/code/instance/parts/omlette/ *.py

Package configuration

When creating a new package and you need to add a new dependency
  1. edit profiles/default/metadata.xml to add in a new dependency and increase version number
  2. edit configure.zcml to add the upgrade step for the new version
  3. edit setup.py in the top level of the package directory structure and add in the new package to theinstall_requires list.
  4. rerun buildout so that new dependency can be pulled down
  5. rerun instance and go to the Add-on Products section of Site Setup and run the upgrade

Plone debugging

To get an interactive debugger in your plone code:
  • add import ipdb; ipdb.set_trace() into the code
  • the set_trace function sets a breakpoint at the point in the code.

To reload the code you are debugging after you have made changes with out having to restart the service, to gohost:port/@@reload
this doesn't always work. If you get a complaint mentioning something to do with calling super then you will probably just have to live with restarting the service instead.

Friday, 29 July 2011

Documentation

I hate documentation - writing it that is. I really appreciate being on the receiving end of documentation (well, good documentation anyway) but I loathe writing it. My typical level of productivity is about a paragraph a day and, since I have 2 working days left to write both a final report and user documentation for a web site that doesn't seem like it will work.

Only thing worse that writing documentation is reviewing/assessing bad documentation - my eyes just slide off the page mid-way through sentences and my brain start throwing anything it can into the conscious thought-space to distract from the task at hand.

P.S. Think I need to change blog title from Ponderings to Grumblings.

Friday, 18 March 2011

Argh!

Do you know what I hate? I hate it when the boss says "it'll be easy, just use this code as the basis of the project - we want the same thing just a bit different." Then you find the code and you find out there is no documentation, no comments and it doesn't just install and run. So then you are stuck trying to work out what the hell the code does and why it doesn't work. And its written in a language you are unfamiliar with.

It sucks.