Like jQuery, the jQuery UI user interface library (version 1.8.7) is already included and registered by the system module of Drupal 7. All you need to do is enable it. You can include jQuery UI in the PHP editor of a single node or module: If you add an individual effect, Drupal will add the […]
Author: Geoff Stratton
Ubuntu 16.04 Web Server with Apache, PHP, and MySQL
Ubuntu 16.04 LTS has been out for a little while now, and its standard repos offer some nice enhancements over Ubuntu 14: Apache 2.4.18, PHP 7, and MySQL 5.7.12 The process for creating a basic LAMP web server is also streamlined, as a couple of bugs that plagued Ubuntu 14.04 are now eliminated. To create […]
Ubuntu 16.04 Web Server with Nginx, MariaDB, Redis, and Drupal 7
The Drupal 8 version of this article can be found here. As of today, April 21, 2016, Canonical has released Ubuntu 16.04 Server, supported until 2021. Ubuntu 16.04 has some nice enhancements, and some changes that will affect sysadmins and developers: it ships with Python 3 as the default Python, plus PHP 7, MySQL 5.7, […]
Drupal 7 Search Engine Optimization (SEO)
So I recently migrated my web site to Drupal after running it in WordPress for several years. Not surprisingly for a redesign where all the URLs changed and much content was added, my traffic numbers cratered, but after some tinkering they’ve gone back up again. After this little experiment with SEO, here are some things […]
Performance Monitoring Tools
A list of Linux performance monitoring tools for CPU, disk, memory, networking, and debugging. CPU, Memory, Disk Monitoring sar and iostat are part of sysstat and available in most package repos. `sar -switch 1 3` means “perform the test three times at one-second intervals”. List processes by CPU/mem usage: $ htop Show CPU usage, all […]
jQuery: Summarize Table Entries
Simple jQuery script for summarizing the results of my Amazon book listing. Since jQuery is already included in Drupal, I figured I’d use it to summarize the ratings and values. Note that in Drupal (and WordPress), jQuery defaults to noconflict mode so the “$” shortcut isn’t available. You can override this by setting jQuery.noConflict(false) or […]
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 […]
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; […]
Python: Webscraping With BeautifulSoup
Some experiments in website scraping using Python 2.7 with BeautifulSoup 3.2. The first function here shows various manipulations of an HTML page, including saving a scrubbed file to disk. The second function shows a simple crawler that attempts to traverse a domain and build a sitemap from hyperlinks encountered in the pages. Includes some commentary […]
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 […]