Debugging gitignore

November 8, 2018

If you have a file being ignored by git and you try to add it, you'll get a message something like this:

The following paths are ignored by one of your .gitignore files:
web/scripts/blah.txt
Use -f if you really want to add them.

To find out ...

Finding string in BASH array

November 5, 2018

I had a need to go through an array variable in bash and see if certain strings were present in the specified order. The existing code looked for values at specific array indexes, but this was deemed too fragile. The fix was to make sure that the strings were present ...

Testing Internal Methods in C#

October 16, 2018

When you have a C# project that contains methods marked internal, they can be tested from a separate Tests project.

In the project to be tested, open up Properties/AssemblyInfo.cs and add

[assembly: InternalsVisibleTo("ViewerTests")]

where ViewerTests is the name of the project that contains the tests.

This ViewerTests ...

Active SQL Statements on Oracle

October 2, 2018

This query can be used to show the active SQL statements, and their elapsed time, on an Oracle database.

SELECT nvl(ses.username,'ORACLE PROC')||' ('||ses.sid||')' USERNAME,
   SID,   
   MACHINE, 
   REPLACE(SQL.SQL_TEXT,CHR(10),'') STMT, 
  ltrim(to_char(floor(SES.LAST_CALL_ET/3600), '09')) || ':'
   || ltrim(to_char(floor(mod(SES.LAST_CALL_ET, 3600 ...

Buzz Controllers on Windows 7

September 30, 2018

I've been playing with Playstation Buzz controllers on Windows 7. The first set I tried had black buttons with coloured borders, and this device worked fine. The second set had solid coloured buttons and these didn't work out of the box, I needed to do some messing. Both ...