C#.NET: Globalization

Internationalization is frequently the bane of a developer’s existence. Fortunately, .NET provides a useful namespace called System.Globalization that contains most of the internationalization data you’ll ever need. Simple usage of this for displaying each culture, calendar, and currency is shown here. Obviously, the Windows command interpreter (cmd.exe) doesn’t do Unicode, so running this as a […]

Loading

Read More

Bash: WordPress Installer

A basic WordPress installer in Bash. Assumes Ubuntu 14.04 LTS, so adjust as necessary. The end-of-line backslashes here are added for ease of display, so remove them before running this. #!/bin/bash # Set sitename and directory for WordPress WPDIR=/var/www/wordpress; SITENAME=mydomain.com; EMAIL=myemail@somewhere.com; # Download latest WordPress and untar it wget https://wordpress.org/latest.zip; unzip latest.zip; mv wordpress/* $WPDIR; […]

Loading

Read More

VB.NET: Basic JSON and LINQ

A simple console application that downloads and processes JSON data using .NET 4.0 with the Newtonsoft Json.NET library. The sample data is a list of kings and queens of England and the UK from http://mysafeinfo.com/api/data?list=englishmonarchs&format=json. This uses simple LINQ but the Newstonsoft LINQ to JSON API will be more efficient in many cases. Mysafeinfo.com returns […]

Loading

Read More