Browsed by
Author: baxters

Activity 6: Innovation in your context

Activity 6: Innovation in your context

I am certain my innovations are valued within my context. I have a long experience of providing appropriate systems based on consultation and user feedback. For example: our institution uses a custom Moodle module known as “Corepacks” This is our record of awarding body quality compliance within each taught unit.This was initially an exercise to move from paper based files stored on a shelf to online files. However, this system has grown into a complete process which is tied in…

Read More Read More

A reason to return to Second Life

A reason to return to Second Life

As a long time Second Life user (until 2018) I have chosen to Investigate the Terra Incognito project of the University of Southern Queensland (Australia). I found researching the Terra Incognito project to be quite challenging as there as so many references returned by general internet searches. I tried to structure my research in such a way that I would informally find out as much as possible about the life of the project before filtering out unreliable or out of…

Read More Read More

Startup script for digital signage

Startup script for digital signage

I had a bit of an issue with an Ubuntu box used for digital signage where I need the machine to come up after a restart, automatically log in a user, then launch a full screen web page in Chrome. I initially added a shell script which launched Chrome as part of the user session. Unfortunately, this did not allow enough time for a network connection to be made.  I tried adding a sleep 20 to the script but all…

Read More Read More

Create a set of copy commands from diff

Create a set of copy commands from diff

There’s probably a far better way of managing your Subversion working copies but I find this command is very useful. I often diff two directories with the diff -wbur command This produces a lot of output if there are many changes (pages of it). To limit the output to the lines in the output which point out the changed files I would do: diff -wbur /var/www/moodleupgrade/mod/vqpack/ svntrunks/moodle3modstrunk/mod/vqpack/ | grep diff This produces an output like : diff -wbur /var/www/moodleupgrade/mod/vqpack/view.php svntrunks/moodle3modstrunk/mod/vqpack/view.php…

Read More Read More

Renaming within filenames

Renaming within filenames

I have renamed a Moodle module I’m writing from mod_dumgalinduction to mod_dumgalchecklist because it seems to have more use beyond the original idea (move the student induction checklist off the paper form). To search and replace all of the text within the php files is quite easy: I renamed the lang file from dumgalinduction.php to dumgalchecklist.php manually. I always get in a muddle changing the names of the files in the backup folder so I used this rename command to…

Read More Read More

Prepare a block of text to display in php

Prepare a block of text to display in php

I need to append the contents of a text file to a string in php line by line. awk and sed are very useful for such things. Here is the content of the file. It’s a fairly standard bit of bootstrap HTML. I need to replace all of the ” characters with ‘, then start each line with $string.=” and end each line with \n”; Cat divs.txt simply prints the content of the file. This is piped into the sed…

Read More Read More

ssh login with no password

ssh login with no password

It’s really inconvenient to continually enter your password when ssh’ing among internal servers. Especially if your password is long. I have set up password-less login on some of our linux servers using this excellent guide. I had already set up a private/public key pair on my mac in the .ssh folder in my /Users/ folder: It’s necessary to send your public key to the server you intend to log into. The provided command does not work because the hidden directory…

Read More Read More

Blob problems

Blob problems

I have recently encountered a problem loading BLOBs from SQL server 2012. Until moving to PHP 7.x we previously used the mssql libraries. Now we are using the dblib driver in PDO the php_mssql libraries are gone for good. It appeared that, once again, files were being truncated to 60Kb (an old problem). It’s not clear why this started to break again. No new packages have been installed. Using php_mssql it was possible to: These ini_set statements don’t have any…

Read More Read More

Randomise column in CSV using awk

Randomise column in CSV using awk

In packaging our learning analytics automation system I have provided test data in CSV files on the Virtualbox machine. These CSV files contained actual student ID numbers from our College so I needed to replace them with random, non-repeating information. I have substituted these with Student(n) to represent the real students for this post. I found an excellent AWK entry on the evergreen Stack Overflow which fit my particular use case. This is very close to what I need to…

Read More Read More