GPG signed commits in PHPStorm on CentOS 7

Having the functionality of automatically being prompted to sign your commits while still using PHPStorms Git GUI means you’ll never forget to sign commits again.

To start with, the version of Git installed needs to be > 2.0, otherwise certain options we are using will not work.

On CentOS 7 you’ll need to either build from source, or use a 3rd-party repository such as the IUS Community Project in order to do that. I prefer using repositories over building from source, as it’s easier to update the packages later on.

To use the 3rd-party repository method run the following:

yum install epel-release
yum remove git
rpm -U https://centos7.iuscommunity.org/ius-release.rpm
yum install git2u

Next, if you don’t have a GPG key yet, you’re going to need to generate one, GitHub have a nice guide on this already.

Next we need to add some options to our git config, I’ve went with adding to my global configuration here, however you can set this on a project by project basis by just omitting the --global tag.

git config --global commit.gpgsign true
git config --global user.signingkey ENTER_YOUR_KEY

If you’re confused on how to get your signing key for above, again Github have a guide on that.

At this point, running git commit -S -m "Example commit" will prompt you to enter the password for your secret key.

The last part is to add the following configuration to ~/.gnupg/gpg.conf

no-tty

Now when you make a commit in PHPStorm, you’ll be prompted for the password for your secret key, and the commit will be signed.


Posted on January 23, 2019

Control Your Windows PC with an Xbox Controller

Xbox 360 Controller

Today I’m going to walk you through setting up an xbox controller to work on your computer and control the mouse / keyboard.

First your going to need an Xbox Controller that works on Windows . If you already have an Xbox controller you can just pick up one of these receivers . (Both links to Amazon, you can find on eBay cheaper).

Next you’ll need to install the drivers for the controller. You can find them on Microsoft’s website here .

Now you should be able to connect your controller to the computer and play any games using it. However you can’t use it to control the mouse yet. What we will need to do next is download JoyToKey from here . I went with the latest Beta version however you can also download the stable (v 4.6 at time of writing).

Now you can edit the configuration of what you’d like each button to do using the JoyToKey GUI.


Posted on January 25, 2012

Earcandy in Ubuntu Jaunty

EarCandy is a volume manager for PulseAudio that fades applications in and out based on your current activity. Meaning it can do handy things like muting your music playing when you decide to turn on a youtube video. EarCandy can sniff out applications to tell what kind of application they are

Screenshots:

earcandy.png

earcandy2.png

How to install Earcandy on Ubuntu Jaunty

You can do this by using the following command:

sudo kate /etc/apt/sources.list

Then add the following to the end of the file:

deb http://ppa.launchpad.net/earcandy-devel/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/earcandy-devel/ppa/ubuntu jaunty main
``
Then you can install earcandy by using the following command!
```bash
sudo apt-get install earcandy

Posted on September 28, 2009

Create a URL Shortener With Your Domain

If you use URL shortening services like TinyURL , it may be worth your while to setup a domain shortening service on your own domain. This is quiet easily done with a WordPress plugin now.

YOURLS is a free PHP script created by Lester Chan and Ozh Richard that allow you to create something similar to TinyURL.

  • It is easy to install.
  • It has a statistic side that allows you to keep track of all the URLs you are currently using.
  • It also easily allows you to choose between making your service open for all or just for you.
  • It lets you have customizable links instead of random characters.
  • Lastly it has a bookmarklet that allows you to make TinyURLs on the fly!

Download it and try it out!


Posted on September 24, 2009

Autoinstalling .Debs on Firefox

I was trying to use a get .debs website the other day and with a lot of frustration of firefox saying Firefox does not have the correct protocol to open this file [.apt] I finally figured out that I did not have apt-url installed on kUbuntu.

This can be fixed by simply opening a terminal window and typing:

sudo apt-get install apturl

Then restart firefox. Go to download another .deb / .apt file and when it asks you what you would like to use to open the file browse to /usr/bin and pick whatever installs your programs.


Posted on September 17, 2009