Martin Fitzpatrick
  • Home
  • Latest
  • About
  • Books & Courses
Sign in Subscribe
Tutorials

Control Console with SysReq

System request (often abbreviated SysRq or Sys Req) is a key on keyboards for PCs that has no standard use. This key can be traced back to the operator interrupt key of the IBM System/370 mainframe computer. But under Linux there's a bunch of useful things available
Dec 28, 2011 1 min read
Tutorials

Use bash brace expansion to save {hours,days}

Brace expansion is one of the most powerful bash tricks with the potential to save you considerable time. Bash brace expansion takes a list of arguments and expands them into separate arguments to the command. $ echo hello{1,2,3} hello1 hello2 hello3 🧠Braces can also be nested for more
Dec 5, 2011 1 min read
Tutorials

Install Cinnamon on Ubuntu 12.04

Cinnamon is a re-implementation of the Gnome 2 desktop in GTK3 developed by the Linux Mint project as an alternative to both Gnome3/Shell and Ubuntu Unity. Here we explain how to install Cinnamon on top of your Ubuntu installation, without installing Linux Mint. As with all Ubuntu unsupported software
Nov 29, 2011 1 min read
Tutorials

Get a list of all processes not run by you

Find the currently running processes on your system that were not started by yourself. A great way to find out what is hogging your system on multiple-user setups or remote logins. Open up a terminal session and enter: ps aux | grep -v `whoami` ps aux returns (a) all processes with
Nov 29, 2011
Tutorials

Get file type information from the command line

Sometimes you're not sure what type of file a file is. Perhaps the file doesn't have an extension, or it's been removed accidentally. The often forgotten the file command will analyze a file for common markers and give you a simple summary of a
Nov 29, 2011 1 min read
Tutorials

Reload .bash_profile without logging in again

If you have updated your .bash_profile you may want to reload the latest changes into your current shell & avoid logging out and back in. The .bash_profile is actually an executable bash script. To reload it we need to load & execute it in the current shell. We
Nov 29, 2011 1 min read
Tutorials

Find All Running Processes of a Program

Find the pids of all instances/processes of a given program running on your system
Nov 29, 2011
Tutorials

Piping between shells

Create your own bash pipes to send program output between shells, processes and users.
Nov 28, 2011 1 min read
Tutorials

Quickly serve a folder via Web Server

Sometimes you'll want to quickly serve a folder from the commandline, so you can view the contents in the browser. For example, if you're generating a static website or want to view how animated GIFs or SVGs appear in the browser. Python comes with a mini
Nov 8, 2011 1 min read
Tutorials

Set CDPATH to ease folder navigation

CDPATH is an environment variable which tells the cd command where to look for the specified folder. By including the parent folders of commonly used locations you can access folders more easily - and without typing an entire path. Open up your shell profile file .bashrc (Linux) or .bash_profile
Nov 8, 2011 1 min read
Tutorials

Use ifconfig.me to return your IP and Host

ifconfig.me is a web service that displays information about your connection, including IP address, hostname and User Agent string. Helpfully it provides a simplified interface that can be easily queried to get this information from the command line. All commands are variations on the below. curl ifconfig.me curl
Nov 8, 2011 1 min read
Tutorials

Find Top 404 Error Pages with Apache

A quick one-liner to find the most common pages giving 404 errors on your apache2 setup. Set this up as a shell alias to get easy access at any time. cut -d'"' -f2,3 /var/log/apache/access.log | awk '$4=404{print $4" "
Nov 7, 2011 1 min read
Tutorials

Execute last command as root

Sometimes you need to re-run a command you just ran, but this time as a super-user. For example, you may have run a command which needed super-user rights, but forgot to prepend the command with sudo. In that case you can make use of the !! bash shortcut to re-run the
Nov 6, 2011
Launch GNOME Shell from the console
Tutorials

Launch GNOME Shell from the console

Debug Gnome Shell, or run it from the console, either for plugin development or troubleshooting.
Nov 3, 2011
Use GNOME Looking Glass for debugging
Tutorials

Use GNOME Looking Glass for debugging

Looking Glass is GNOME Shell's integrated inspector tool and JavaScript console useful for debugging. Open the run prompt by pressing Alt+F2 Enter lg to start Looking Glass Commands can be entered directly at the prompt e.g. global.get_window_actors() Exit at any time by pressing
Nov 3, 2011 1 min read
Re-execute command line with !
Tutorials

Re-execute command line with !

Bash history expansion allows you to quickly re-run previous commands using ! and the number of the command in your history.
Oct 22, 2011 1 min read
Tutorials

Control-R Through Your History

Interactively search through your command line history with a simple keyboard shortcut.
Oct 22, 2011
Install Homebrew Package Manager for MacOS
MacOS

Install Homebrew Package Manager for MacOS

Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn't include with OS X.
Oct 21, 2011 1 min read
Tutorials

Use screen to manage persistent sessions

GNU Screen is a command-line application that allows use of multiple virtual sessions within a single real terminal or remote session. Importantly, it allows for persistent running of command-line applications independent of the shell that initiated them program, meaning active applications can persist during disconnection. 🧠This is just one of
Oct 2, 2011 1 min read
Add Git Branch Name to Terminal Prompt on MacOS
Tutorials

Add Git Branch Name to Terminal Prompt on MacOS

When in a repository directory you can show the name of the currently checked out Git branch in the prompt, making it easier to track where you are (and where you're about to commit). The following instructions are written for Mac OS X (Lion) or later, using a
Sep 29, 2011 1 min read
Show Warning in Prompt When Shell Loses Directory
Tutorials

Show Warning in Prompt When Shell Loses Directory

In this quick tutorial we'll learn how to show a warning in the Terminal's prompt when the current working directory is no longer where the shell expects it to be. Why is this useful? Take the scenario where you receive frequent updates to a file foo.
Sep 28, 2011 2 min read
Setup Android Development with Eclipse on Mac
Tutorials

Setup Android Development with Eclipse on Mac

In this short tutorial we'll walk through the process of installing and setting up the tools necessary for Android development with Eclipse on Mac OS X (Lion) Download Eclipse Classic for Mac from the Eclipse download page. 💡Eclipse Classic is recommended but those who know they need a
Sep 22, 2011 1 min read
Initialize Git Repository from Local Files
Tutorials

Initialize Git Repository from Local Files

Initialize a Git repository from a local directory, and the files therein, pushing it to an existing but empty remote.
Sep 20, 2011 1 min read
Tutorials

Developing with WP-Plugins SVN

The new plugin download interface, hooked into wp-plugins.org adds extra incentive for plugin developers to use SVN. There are a number of detailed SVN guides available, as well as an entire online book. But for casual plugin developers wanting to get the benefits of using the system most of
Mar 26, 2007 8 min read
Tutorials

KDE fileprotocol & transportprotocol URLs

While getting started using the new wp-plugins.org SVN I was looking for a quick way to download the contents of an SVN to local disk. This can be useful when doing research on methods employed by other plugins or for getting a local development copy where SVN access is
Mar 20, 2007 1 min read
← Newer Posts Page 4 of 5 Older Posts →
Martin Fitzpatrick © 2026
  • Sign up
  • Contact
  • Payments
  • Refunds
  • PyQt6 Book
  • PySide6 Book
  • Privacy & Legal
Powered by Ghost