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.

Making a simple RTS game ‚Äď Week Three

This entry is part 3 of 3 in the series Making a simple RTS game

So week two of making an RTS was September 2nd – 9th.¬†Almost three months later I’ve managed to spend most of my weekend on it. ūüėÄ This is pretty typical timeline of any of my personal side-project’s. *sigh*

So¬†I started on Friday after having a burger and beer at the ingeniously named Burger and Beer doing some work on graphics.¬†Even though I haven’t put any work into the game I had been thinking about how to make things easier since I’ve decided to make an RTS game as my first game while learning PhaserJS. Not exactly the easiest¬†idea to go for, snake or space invaders would have been much easier ūüėõ . So I decided to ditch my idea of having actual units that would require a lot of animation and switch to a space theme as spaceships seem easier overall to animate. I bought “Space Shooter Creation Kit” from Gameart2d.com¬†which was only $13.50 USD so pretty reasonable cost for a hobby project.

Making a simple RTS game – Week Two

This entry is part 2 of 3 in the series Making a simple RTS game

So week two has gone relatively well, I didn’t spend as much time working on the game as I would have liked, it’s hard going from programming at work to programming at home every day. However I persevered and at least made some progress.

I ended up making a map since it was hard to try develop controls and camera without having anything to see, I found out about Tiled which is a free tile map editor, very easy to use. Not wanting to waste my time on trying to create graphics (and hating whatever I ended up making), I browsed /r/gamedev for some free assets to do for the moment, turns out this Kenny NL guy has some amazing stuff for free up there. I ended up going with his ‘Topdown shooter pack‘ as it seemed visually appealing to me.

Next step was figuring out how to get the cursor (arrow) keys to work as input, once I figured out how to do that I set those keys up to handle the camera movement. That was easy enough.

Making a simple RTS game – Week One

This entry is part 1 of 3 in the series Making a simple RTS game

So I’ve decided I want to make a game again, nothing crazy just a simple RTS game, browser based (mainly for speed of development¬†and that I’m interested to see what¬†it’s like), ¬†I’ve decided¬†I may as well blog along the journey to keep myself motivated and prevent quitting mid-way through ūüėõ

I might also do some¬†videos & live streams¬†as we get closer a prototype and there is actually something interesting to watch me doing rather than researching things. So watch this space. ūüôā

So far stack wise I’ve decided on using the following tools:

  • Phaser.io¬†–¬†Open source HTML5 Game Framework
  • Socket.io¬†– Real-time bidirectional event-based communication.

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.