Workflow

Over the last few years, I’ve worked on an open source project management system called Phproject. It’s on GitHub under a GPL license, and you should use it.

Apparently I did a good enough job of it that someone tried to sell it. A Slovakian team going by the name KreaHive rebranded it as “Workflow”, and posted it to CodeCanyon. Apparently it was removed from the site quite quickly as I never saw it active, but I found it quite funny. After a bit more research, they have a public revision history that perfectly matches my latest updates on RevCTRL, and even made it to a business software review site, Capterra.

Workflow on Code Canyon

Then it got even better. I found a supposedly “nulled” version of Workflow on a site called Guest Post. Sadly the download links just redirect you back to the Code Canyon site, I would’ve loved to see what code changes were made in a nulled version of a stolen version of my open source project. At least they linked to a neat marketing graphic for it.

xinput

So I just discovered xinput. It’s neat.

Say you want to reduce the sensitivity on your mouse because it’s one of the stupid Mamba 2012s that are only usable with the buggy Windows software.

xinput list # lists input devices - note the ID of your device, we'll use '8'
xinput list-props 8
xinput 8 "Device Accel Constant Deceleration" 3

Arch Web Server

When a LAMP server just isn’t enough, you may as well go all-out with nginx, HHVM, and MariaDB on Arch Linux.

Start by installing and enabling the services:

sudo pacman -S nginx hhvm mariadb
sudo systemctl enable nginx
sudo systemctl enable hhvm
sudo systemctl enable mysqld

Run the initial setup for MariaDB:

mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

Create a new file /etc/nginx/hhvm.conf:

location ~ \.php$ {
  fastcgi_pass   127.0.0.1:9000;
  fastcgi_index  index.php;
  fastcgi_param  SCRIPT_FILENAME $request_filename;
  include        fastcgi.conf;
}

Add a line to any nginx servers that need PHP:

include hhvm.conf;

After your MariaDB and nginx are configured, start your services:

sudo systemctl start nginx
sudo systemctl start hhvm
sudo systemctl start mysqld

Now you should be good to go!

LAMP Sever Setup

Sometimes you have a fancy VPS when you really just want a web server. This guide goes through the process of setting up a basic LAMP server with WordPress on Ubuntu.

LAMP Setup

To start out, you’ll need to install some packages. This step will ask you to create a database password, you should pick something secure that you can remember.

sudo apt-get install apache2 php5 php5-gd php5-mysql mysql-server-5.6 wget

After installing your packages, enable the rewrite module for pretty URLs in WordPress and other apps that use it.

sudo a2enmod rewrite

You should then edit your Apache configuration file. You’ll need to change the AllowOverride None line in the <Directory /var/www> block from None to All in order for .htaccess files to work properly.

sudo nano /etc/apache2/apache2.conf

Finally, restart Apache to apply your new configuration.

sudo service apache2 restart

WordPress Setup

Installing WordPress follows a pretty typical process that should work for most web apps and custom sites. We’ll start by creating a database. Run the command below, entering your database password chosen during the package installation.

mysql -uroot -p

Once in the MySQL command line, we’ll create a new database and user. Replace “Passw0rd” with a secure password. You’ll use this username (“wordpress”) and password to install WordPress later.

CREATE DATABASE `wordpress`;
CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'Passw0rd';
GRANT ALL ON `wordpress`.* TO 'wordpress'@'localhost';
FLUSH PRIVILEGES;
\q

After creating a database, we’ll download and unzip WordPress.

cd /var/www
sudo wget https://wordpress.org/latest.zip
sudo unzip latest.zip
sudo chown -R www-data: wordpress
sudo chmod -R 755 wordpress

We need to tell Apache to run our WordPress code, so next we’ll create a new VirtualHost.

sudo nano /etc/apache2/sites-available/wordpress.conf

Enter the following text in the new file, replacing example.com with your domain (you should point the domain to the server’s IP address as well):

<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/wordpress
</VirtualHost>

If you want additional domains or subdomains to point to this website as well, you can add a ServerAlias line after ServerName, like this:

ServerAlias www.example.com example.org

Now that your VirtualHost is created, enable it and reload Apache.

sudo a2ensite wordpress
sudo service apache2 reload

At this point, if your domain is set up correctly, you should be able to browse to your website and install WordPress. You’ll need the database username and password you set up earlier, and the database hostname should be localhost.

Once installed, you should go into WordPress’s admin panel and change the Permalink style (Settings > Permalinks) to something other than the default to take advantage of Apache’s URL rewrites.

Arch Setup

I’ve always loved the concept of Arch Linux, with it’s nothing-by-default setup and intentional lack of user-friendly tools, but I’ve run into issues with the installation that’ve prevented me from really using it enough to get familiar with it.

This time around I got it working perfectly, so I decided I’d write a little guide on what I did. This is mostly just a reference for me, but it should prove useful to anyone trying out Arch for the first time. This guide assumes familiarity with linux basics, like sudo, fstab, gparted, and you should probably read Arch’s Beginner’s Guide.

Getting Started

Start by booting the live CD.

Partition setup

Note: this guide only covers the setup for a MBR partition table as booting GPT requires more system-specific setup.

If you prefer a more graphical tool you can use the Gparted live CD to configure your partitions, then skip to the “Install base system” step. Note that the current version of the Gparted live CD won’t boot properly on VirtualBox without EFI enabled.

Locate the disk you want to install your system to with lsblk, then start cfdisk with that device.

cfdisk /dev/sda

In cfdisk, create a new partition table, then the partitions you would like, writing the changes when you’re finished.

Next, create a filesystem, substituting your new system partition and repeating for each partition you need to format.

mkfs.ext4 /dev/sda1

If a swap partition was created, activate it:

mkswap /dev/sda2
swapon /dev/sda2

Install base system

Mount partition

Start the installation by mounting your system partition, and any other non-swap partitions you created in /mnt.

mkdir -p /mnt
mount /dev/sda1 /mnt

Set up base packages and fstab

Move your preferred mirror to the top of the list, or add mine (https://mirror.phpizza.com/archlinux/):

vim /etc/pacman.d/mirrorlist

Install base packages and generate new fstab:

pacstrap -i /mnt base
genfstab -U -p /mnt >> /mnt/etc/fstab

Chroot into the new installation:

arch-chroot /mnt

Configure language

sed -i "s/#en_US.UTF-8/en_US.UTF-8/g" /etc/locale.gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
. /etc/locale.conf
locale-gen

Configure timezone

ln -s /usr/share/zoneinfo/America/Denver /etc/localtime
hwclock --systohc --utc

Configure network

Run ip link to list all network interfaces and enable DHCP on the one you want to use:

ip link
systemctl enable dhcpcd@eth0

Configure wireless (optional)

pacman -S wireless_tools wpa_supplicant wpa_actiond dialog
wifi-menu
systemctl enable net-auto-wireless

Configure package manager

Open /etc/pacman.conf and check that the [core], [extra], and [community] lines are uncommented. If you’re on a 64-bit system (you should be), optionally uncomment the [multilib] lines for 32-bit compatibility.

After updating your pacman config, refresh the repository list:

pacman -Sy

Create a user

passwd # Set root password
useradd -m -g users -G wheel,storage,power -s /bin/bash alan # Create 'alan'
passwd alan # Set password for alan

Configure sudo

pacman -S sudo # Install sudo

Uncomment the %wheel line to allow your new user to use sudo:

EDITOR=nano visudo

Install bootloader

pacman -S grub-bios
grub-install --target=i386-pc --recheck /dev/sda
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
grub-mkconfig -o /boot/grub/grub.cfg

Finish installation

exit
umount /mnt
reboot

Desktop setup

X.org

# Xorg
pacman -S xorg-server xorg-xinit xorg-server-utils \
  xorg-twm xorg-xclock xterm

# Mesa (3D acceleration)
pacman -S mesa

# Drivers (only one needed)
pacman -S xf86-video-vesa # Vesa (general, works almost always)
pacman -S nvidia lib32-nvidia-utils # Nvidia

Desktop environment

Xfce4 + lightdm

pacman -S xfce4 xfce4-goodies lightdm lightdm-gtk-greeter
systemctl enable lightdm # Enable lightdm

Gnome

pacman -S gnome # Install desktops
systemctl enable gdm # Enable gdm

KDE Plasma 5

pacman -S plasma kde-applications
systemctl enable sddm

After installing your preferred DE, reboot, and your system should be ready to go! If you decide to switch DEs, make sure you disable the display manager before uninstalling, otherwise you’ll have to manually remove the symlink from /etc/systemd.

If you’re running Arch in VirtualBox, you’ll want to install the guest additions with pacman -S virtualbox-guest-utils.

For a basic overview of the pacman and the Arch User Repositories, see the Arch wiki and this gist.