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.¬†

Helpful Linux commands

So this is just going to be a bit of knowledge dump of things I’ve picked up lately / don’t want to forget.

Bang Cash !$

If you are intending on running a few commands with the last argument of the command being the same this can be really helpful. For example:
ping 127.0.0.1
netmap !$
traceroute !$

Alternatively you can also do !* to use all the arguments of the previous command.

Bash/Cygwin Terminal in PHPStorm

I’ve been meaning to post about this for a while, but it seems¬†hard lately to make time to post here.

I personally hate windows shell, in my mind it is utterly useless. If I’m ever using it I’m probably not in a good¬†mood. Powershell makes me laugh, like I’m sure it has some uses for people who for some insane reason run Windows servers, but for a sane developer; I think not.

Bash is where it’s at,¬†probably¬†the tool/language that saves me the most time on a day to day¬†basis. Regex is a close second and guess what, Regex¬†& Bash play very nicely together. Luckily I work with a company that exclusively uses Linux servers, because they make good decisions¬†like that. ūüėČ So any server admin is painless, however for development, I still seem to be stuck in Windows land. I could make the leap over to just using¬†Linux, however there are unfortunately a handful of programs keeping me on Windows and WINE still sucks.

My thoughts on management & time tracking

So I’ve talked about time tracking before, however that was much more a “Keep yourself on track / how to know what to bill per hour as a freelancer/contractor”. Today I’d like to share some thoughts on bigger companies and my feelings toward management¬†and time tracking there.

I’ll preface all this with “these are my opinions, I’m not saying I’m entirely correct here, this is just how I personally feel“.

As a programmer I love my craft, I spend hours¬†playing around with new technologies, learning new languages and wrapping¬†my head around computer science concepts. I’ve always¬†known¬†programming would be my career from a young age,¬†finding it amazing that¬†people would pay me to do what I love to do anyway. ūüôā

First month at Kobas

So I’ve been working for roughly a month at Kobas now, I think things have been going very well and I wanted to highlight what I’ve been working on for the last couple of weeks.

For anyone that doesn’t know what Kobas does,¬†it is a hospitality management solution covering;¬†stock control, rotas, HR,¬†EPoS, customer loyalty and much¬†more. It’s actually a very useful piece of software for clients, allowing them to gather lots of data from all areas of their business and providing a cloud interface that outputs that data in fancy¬†reports. After seeing it in action¬†I find it very surprising that not all businesses use this as it can really help you to increase your profits and avoid wasting money unnecessarily.

An honest review of the Surface Pro 3

I bought a Surface Pro 3 in November 2014, I haven’t wrote anything at all about my thoughts on it since purchasing it, I¬†figured it was better to wait until I had actually been using it for a significant amount of time and give it an honest review. A year and a half¬†I figure to be more than enough time. ūüėõ

So this post is going to be structured in the following way, condensed¬†Pro/Cons. for you speed readers and then just my personal thoughts on¬†things I’ve come across while using the device.

Goodbye Vancouver, Hello London

img_20150623_130149.jpgSo I¬†have left beautiful British Columbia and I’m back in Europe, in London of all places. I’ve¬†gone full circle it seems! ūüėõ

I’m not going to bother going into the details of why I left Vancouver, but¬†in short, you can’t extend a “two year working holiday” visa. Which totally sucks as after two years I had¬†really set myself¬†up over there.

So after many many goodbyes and cramming in as much touristy things as possible in the last couple of weeks I set sail back to London. Getting the cheapest possible flight which had two stopovers; Toronto (11 hours), Saint Johns (2 hours).

Free SSL Certificates with LetsEncrypt and Ajenti-v

So this is going to be a very quick post on how to use LetsEncrypt SSL certificates on your Ajenti-v setup. Ajenti-v will probably be supporting this natively at some point, there is an open issue on their Github here. But in the meantime you can just follow these steps to start using LetsEncrypt now.

Step 1. Install LetsEncrypt.