using screen
Use screen when you want to manage multiple sessions in a terminal. Install it on Ubuntu
sudo apt-get install screen
There are a lot of options for screen. I won't go into them. I use screen most often when I shell into a remote server and want to hop i...
Written by Sean Behan on 06/17/2012
Add Users to a Group on Ubuntu
To create a new user on Ubuntu (Heron8)
adduser johndoe
To create a new group
groupadd barleyfarmers
Add johndoe to the barleyfarmers group
adduser johndoe barleyfarmers
The adduser command, when you're first adding the new user accou...
Written by Sean Behan on 03/02/2017
How Many Gigs of RAM Are On My Server?
How much memory is on my linux server? Run the free command
free -g
total used free shared buffers cached
Mem: 2 1 0 0 0 1
-/+ buffers/cache: 0 1
Swap: ...
Written by Sean Behan on 06/17/2012
Quick Syntax to Pipe an SQL Query Directly to a file
Here is a quick way to put the contents of a database table into a simple text file. This could be handy if for example, you just want to grab some emails and pop the results into a simple csv file. Your sql statement can be as creative as sql allows. All...
Written by Sean Behan on 06/17/2012
A Regular Expression to Generate Dash Separated Slugs AKA Pretty URLs
This regular expression matches non alphanumeric characters in a string.
r = /[^a-z0-9]{1,}/i
You can use it to create URL friendly slugs.
slug = "hello world!".gsub(/[^a-z0-9]{1,}/i, '-').downcase # => hello-world
In combination wit...
Written by Sean Behan on 08/22/2013