GPG signed commits in PHPStorm on CentOS 7

First thing, 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, automatic updates etc. 

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.

Being a PHP Developer in 2015

This is just some thoughts on being a PHP developer in 2015;

A standard web project before used to just require you to setup a local web server, and then you’d upload to a standard web host with some worries about PHP versions perhaps but little to no thought required for the server side of things.Frameworks were a new thing, CodeIgniter was (to me at the time) the best thing to happen to PHP,  introducing me to PHP MVC patterns, easily integrated vendor libraries (I never got into Zend Framework) and Twig.

Esprimo Mobile v5535 and Ubuntu 10.10

So I ended up picking up a cheap Esprimo Mobile v5535 a few days ago, long story short; laptop broke, Argos have sent it off for repairs that will take 2-3 weeks, don’t buy a laptop from Argos! 😛

Anyway the Esprimo Mobile isn’t exactly a cutting edge laptop, if you said it was outdated you wouldn’t be wrong! 😉 When I got it the OS installed was Windows Vista, “ambitious” I thought, of course I can’t have any kind of computer without tinkering with it endlessly to find out the best way performance wise for it to be running, Ubuntu was in my head from the start but an apparently broken CD-drive was putting an end to that.. I’ve never tried to install Ubuntu from a network and I wasn’t going to start now, [USB wasn’t an option in boot] instructions on Ubuntu’s Support don’t make a network install look simple!

A few Registry edits later, (one too many infact) I had the CD-drive working but Windows locked in that state of “somethings missing, would you like to use Startup Repair?” and then when using Startup repair just rebooting the computer into the same cycle. No worries though at this stage I just began installation of Ubuntu. I was surprised to see that the Wi-Fi worked from the get-go, is nDiswrapper ever needed any more? 😛 The only issue was the resolution seemed to go no higher than 800×600.. Of course a few google searches later and I found this article which explains how to install the drivers for SiS Graphics. Using their default Xorg.conf and driver I rebooted only to find the machine now screwed graphic wise, lines all down the screen changing.. I originally thought it was the refresh rate but hell this is Linux, you could set every setting to the absolute worst one possible and still be able to change back, where is that option Windows? So I switched to a terminal window [Ctrl + Shift + F5 (any F key) for those interested] opened up Xorg.conf using "sudo nano" changed what seemed to be affecting the graphics;  Option  "UseTiming1366" "yes" to Option "UseTiming1366" "no" [didn’t know yet if it was the problem] rebooted and presto a 1280×800 resolution!

So the point of this story is; It’s great how in Linux you’ll mess something up and still be able to repair it via a terminal window, and if you need better resoloution on your Esprimo Mobile click this link.

Saving Your Windows PC From Virus Infections with Linux

Often you get a friend or other times a client who has gotten themselves locked out of their system by a virus. I’m talking about the seriously nasty virus’s out there that will just corrupt every .dll file they can get their hands on so the minute you try to open any program, your reopening the virus.

When this is the case there isn’t much you can do in terms of anti-virus scans etc. your only option is to wipe the machine and go for a clean re-install of Windows.

But what about all my files?

Well we backup all of those files onto an external hard drive before wiping by loading up a “Live CD” of Ubuntu, simply navigating to the computers hard drive,  selecting what we need and loading it onto the external hard drive.

The beauty of a “Live CD” is that the entire operating system runs of the CD [believe me you’ll here it spinning around the place] so the virus has no chance to load since Windows never gets booted.

Ontop of that Linux systems aren’t vulnerable to Windows virus’s so you can be sure your not infecting your external hard drive aswell.

Earcandy in Ubuntu Jaunty

What is Earcandy?
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

Some Screenshots:
.Ear CandyEar Candy

Video of it in action:

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!
sudo apt-get install earcandy

Got kUbuntu 9.04 on disc!


My address has finally been sorted, there was some confusion with the post man and where I lived since moving into the newly built apartment, but today kubuntu 9.04 “Jaunty Jackalope” came through the door!

With its world-renowned Ubuntu core and the KDE 4.2 desktop, Kubuntu 9.04 gives users a well-rounded, feature-filled and elegant desktop.

Best of all these cd’s are free thanks to Shipit and ubuntu! Check it out here! I recommend anyone that has to fix computers to get themselves one, live cd’s really can be a lifesaver!