Ryan Harrison My blog, portfolio and technology related ramblings

Use the Tomcat 8 server in Eclipse

The current version of Eclipse (Kepler as of writing) doesn’t natively support version 8 of the Tomcat server. Although support will be added eventually, this is not likely to be until the release of Eclipse Luna in late June 2014. In the meantime, to add support you can download and install the latest version of the WTP (Web Tools Platform) into your current Eclipse environment.

  1. Go to the WTP Downloads Page and select the link to the latest release (easiest to look at the most recent build date). As of writing the latest version is 3.6.0.
  2. Under the ‘Traditional Zip Files’ section, download the .zip file for Web App Developers.
  3. Extract the archive somewhere and copy all of the files in the ‘features’ and ‘plugins’ directories’ into the corresponding directories in your Eclipse folder (overwriting the existing files).
  4. That’s it. Open up Eclipse and you should see the option for a Tomcat 8 server.

Tomcat 8 Server in Eclipse

Read More

Git - Change most recent commit message

When using any version control system it’s inevitable that you’re going to make some kind of mistake when writing out your commit messages. Luckily Git makes it extremely simple to change the message of your most recent commit. Simply use the amend command:

git commit --amend -m "new message"

For example given this test repository with three previous commits:

Before ammended message

To change the message of the most recent commit - in this case “Third commit”, you can use git commit --amend -m "This is a modified message"

This gives the updated log messages:

After ammended message

Read More

Git - One Line Log Messages

A lot of the time when viewing the log in your Git repository you aren’t that interested in the author and date/time of each commit - the message and the hash are the most important parts. It would therefore be helpful to cut out everything from the log apart from the main details of each commit. Luckily, just like most things in Git, this is pretty straightforward to do:

git log --pretty=oneline

Which will output something like:

a4cc7fe68b3a9f9fe4b1927aa687714ca05a5096 Third commit  
246387bc6f15b1ca4a384af362cdb0deb8364b0e Second commit  
1c827a75295fe5ad657fd3882cbb3a32c3ca1b2b Initial commit

This is all well and good, yet the hash is pretty long and distracted. Again however there is a way around that as well:

git log --pretty=oneline --abbrev-commit

Which outputs:

a4cc7fe Third commit  
246387b Second commit  
1c827a7 Initial commit

This time we only get a fraction of the hash for each commit (which is all we really need) and the message - much better!

Read More

Source Code From the Movies

It happens all so often nowadays in movies -; an extremely smart character writes some really complex bit of code that nobody else can understand in order to hack into some system or otherwise perform some other complicated task.

Quite often we get a good look at the code they are using -; which often looks very obfuscated -; and we just accept it for what it is. But now someone has taken the time to figure out where the code they use in films and TV shows actually comes from. As it turns out the code they are actually use isn’t all that complicate at all -; and in most cases isn’t at all related to the task in hand.

Check out the site: Source Code in TV and Films

Read More

Introducing Lanyon

Lanyon is an unassuming Jekyll theme that places content first by tucking away navigation in a hidden drawer. It’s based on Poole, the Jekyll butler.

Built on Poole

Poole is the Jekyll Butler, serving as an upstanding and effective foundation for Jekyll themes by @mdo. Poole, and every theme built on it (like Lanyon here) includes the following:

  • Complete Jekyll setup included (layouts, config, 404, RSS feed, posts, and example page)
  • Mobile friendly design and development
  • Easily scalable text and component sizing with rem units in the CSS
  • Support for a wide gamut of HTML elements
  • Related posts (time-based, because Jekyll) below each post
  • Syntax highlighting, courtesy Pygments (the Python-based code snippet highlighter)

Lanyon features

In addition to the features of Poole, Lanyon adds the following:

  • Toggleable sliding sidebar (built with only CSS) via link in top corner
  • Sidebar includes support for textual modules and a dynamically generated navigation with active link support
  • Two orientations for content and sidebar, default (left sidebar) and reverse (right sidebar), available via <body> classes
  • Eight optional color schemes, available via <body> classes

Head to the readme to learn more.

Browser support

Lanyon is by preference a forward-thinking project. In addition to the latest versions of Chrome, Safari (mobile and desktop), and Firefox, it is only compatible with Internet Explorer 9 and above.

Download

Lanyon is developed on and hosted with GitHub. Head to the GitHub repository for downloads, bug reports, and features requests.

Thanks!

Read More