These pages briefly describe some of my open-source projects hosted on Github, most of which will have a link to their own web pages for further information.

A Simple Gem to keep multiple cloned Git Repositories up to date.
Use YAML Configuration files in your Ruby applications and Gems.
Automatically install a standard set of development tools to the Windows 10 Ubuntu Bash system (WSL).
A Ruby Gem to parse command line options. Yes, another one!
A Perl Script with layout and support files to automatically create a windows-based MSYS / MinGW development system from scratch.

update_repo

A Simple Gem to keep multiple cloned Git Repositories up to date.


Summary

The script will simply run git pull on every local clone of a git repository that it finds under the specified directory or directories.

Pre-requirements

It goes without saying that at the very least a working copy of both Git and Ruby need to be installed on your machine. Also, the script has only been tested under Linux, not Windows.

Quick start

Create a YAML-formatted configuration file called .updaterepo (note the 'dot' at the start!) in your home directory that contains at least a location: tag pointing to the directory containing the git repositories you wish to have updated :


---
location:
- /media/myuser/git-repos
- /data/RepoDir

The directory or directories specified (there can be 1 root directory or as many as you wish) must already exist, and can be nested as deep as you wish with many repositories in many subdirectories.

This is the most basic example of a configuration file and there are other options that can be added to fine-tune the operation - see the description of configuration options on the dedicated website.

Now, run the script from anywhere :

update_repo

Note: From version 0.9.0 onwards, the default mode of operation is non-verbose. If you wish the same output as previous versions then specify --verbose on the command line or verbose: true in the configuration file.


confoog

Use YAML Configuration files in your Ruby applications and Gems.


Note : While this Gem is fully functional, the API may be subject to changes before hitting version 1.0.0

This Gem allows your Ruby scripts and Gems to save and load their settings to a configuration file in YAML format.

At it's most basic :


require 'confoog'

settings = Confoog::Settings.new
settings[:var] = value
settings[:array] = [1, 2, 3, 4]
settings[42] = "Meaning of life"
settings[:urls] = ["https://www.mywebsite.com", "https://www.anothersite.com/a/page.html"]

settings[:urls].each do |url|
  puts url
end
# https://www.mywebsite.com
# https://www.anothersite.com/a/page.html
# => ["https://www.mywebsite.com", "https://www.anothersite.com/a/page.html"]

settings[:dont_exist]
# => nil

a_variable = 50
settings[a_variable] = {:one => "for the money", :two => "for the show", :three => "to get ready"}
settings[50]
# => {:one=>"for the money", :two=>"for the show", :three=>"to get ready"}
settings[50][:two]
# => "for the show"

settings.quiet = true # squelch any error or status messages to console

settings.autosave = false # disable autosave if it has been enabled with #new or #autosave

settings.save # save all current parameters to the YAML file

settings.load # load the settings from YAML file.

This Gem is used extensively in my 'Update_repo' Project and has performed flawlessly and with minimal configuration.


ubuntu-win-bootstrap

Automatically install a standard set of development tools to the Windows 10 Ubuntu Bash system (WSL).


This is a very simple (for now) script to set up a NEW UNMODIFIED Windows Subsystem for Linux (WSL hereafter) with the following functionality :

  • Updated to the latest package versions from Ubuntu upstream
  • Have the build-essential package installed plus all required support libraries to enable the below functionality to work
  • Sublime Text 3 Editor installed as standard with Package Control and a number of useful packages
  • The Latest version of Git installed. A skeleton .gitconfig will be set up with a few aliases
  • The Ruby scripting language installed via Rbenv with the current version of Rails installed as standard along with several other common gems
  • Node.js - both the most recent LTS version and latest stable version via NVM. The LTS version is activated by default
  • The Python scripting language both the latest 2.7 and 3.x versions via Pyenv
  • Install the latest STABLE a[https://www.perl.org/]{Perl} scripting language via Perlbrew with cpan and cpanm pre-installed and configured. Several PERL modules that make cpan easier are also pre-installed
  • Enable resolution of WINS hostnames
  • Install GEdit (Text editor) and PCManFM (file manager). Both can be run from the Bash shell using gedit and pcmanfm respectively

Note since WSL is basically just a standard Ubuntu installation this script should also work unmodified on an Ubuntu Distribution, though currently untested.

See the Github repository for full information.


optioneer

A Ruby Gem to parse command line options. Yes, another one!


This project still in a very basic state and is not really usable in its current form.


dev-shell

A Perl Script with layout and support files to automatically create a windows-based MSYS / MinGW development system from scratch.


Note: This project is currently stagnant, I will start working on a replacement using MSYS2 when time permits.

This is my custom MinGW/MSYS development system on Windows. It is a custom setup using the standard MSYS, but using the MinGW-w64 GCC distribution instead of the MinGW provided GCC binaries.

The goal of this project is to be able to make a fully-reproducible and standard development package for MinGW under MS Windows, to reduce errors and frustration caused by contributors to a project using different development bases. It can be set as a development pre-req for project participation.

A secondary goal is to teach myself Perl programming, this being my first attempt at that language, so please excuse the bad coding, and any suggestions for improvement are more than welcome! :) Note that the ‘TinyPerl’ in use during the bootstap phase is a very cut-down version of Perl 5.8.0, so many standard modules are not available. The full Perl 5.20.2 is available to the completed system however.

The command-line environment is based around the ‘Console2’ program and also includes ANSICON to provide ANSI escape sequences in the console. The major bonus is that the whole system is completely portable and can be used on a USB stick on any windows system, without requiring any special prerequisite tools to be already installed on that system.

As a major design decision this script will, for the moment, install the 32 BIT version of the MinGW compilers and libraries, Perl and Ruby. This was to allow ultimate portability and support for the multitude of libraries already existing. Once the project is mature and stable, a 64-bit branch will be added. That being said, one of the features of this project is that all the components are taken from url lists, that also contain the unpack specs, so adding extra libraries, converting to 64-bit or even removing unwanted libraries is trivial.