Author: bradley

Convert CRT and KEY files to PEM files

Typically I only do this if I need to run a server that uses PEM’s only. Convert CRT to PEM openssl x509 -in SOURCE.crt -out SOURCE.crt.der -outform DER This will make a DER file that can be removed afterwards. openssl

Tagged with: , , ,

Signing an APK from a cordova android release build

If you’re like me and you use the CLI for almost all tasks then this will help you sign your APK’s for publishing to Google Play. Step 1 – Build the release APK You’ll need to get cordova to build

Tagged with: , , , , ,

How to install MariaDB on Ubuntu

Here is the best link to the installation procedures that is available.

Adding user to an existing group

I’ve always needed this quick snippet when adding users to existing groups. Here it is. usermod -a -G groupName userName

Tagged with: , ,

How to create swap memory for your Linux server

Firstly we’d confirm how much memory you have on your server: free -m There’s no definitive rule when it comes to how much swap is enough, but try somewhere between 1-2 times the amount of physical RAM your server has.

Tagged with: ,

UFW Allow access to IP on a specific port

In order to allow a specific IP address to access a specific port on your server protected with UFW, issue the following command: ufw allow from [ipAddress] proto [tcp|udp] to any port [port] To delete this rule issue the following

Tagged with: , , ,

MySQL to CSV command line

Sometimes I need to dump the contents of a query out to a CSV file for reporting. Here’s the best method I’ve found thus far to do this on the command line. mysql –user=wibble –password wobble -B -e “select *

Tagged with: , ,

How to install GD on Ubuntu

This little tidbit is a life saver! sudo apt-get install libgd2-xpm-dev

Tagged with:

SSH into machine without password

Being a sys admin I’m constantly logging in and out of machines to perform actions and maintaining a list of passwords, let alone being able to access those passwords for a two second job is a pain in the ass

Tagged with: , , , , ,

Self Signed SSL Certificate

When it comes to creating a SSL cert for testing, the best way is to roll your own. Follow these instructions and you’ll have your CRT file in no time. openssl genrsa -des3 -out website.key¬†2048 openssl req -new -key website.key

Tagged with: , , , , ,