The ATOM editor

ATOM Editor

When I ran with the unwashed (ms windows) I used notepad++, then I moved to sublime when I started using a mac. I had used it for several years, then I decided to look for alternatives one day. I can’t remember why I was unhappy with sublime. I tried Brackets, Komodo, Aptana Studio and a few others but they didn’t feel right. Then I found ATOM, and that felt right. Maybe because it was so similar to sublime, that’s probably it. But it is so much more. It has many plugins you can well, plugin. You can make it just like sublime (but its better), and that may help with the transition. Fuck notepad++ that shit is old news and windows only, and windows fucking sucks. ATOM is cross-platform. Even if I had to do it all over again I would choose mac or Linux over windows, except for gaming (I bought a PS4, yeah fuck xboxes too). That is the only thing you can do with windows that makes sense, but then it doesn’t even really make sense. Everything about windows is wrong but that’s for another story all together.


READ THIS or at least skim through it

One of the most helpful plugins I have found is atom-beautify which is the reason I decided to write this post. Because it was such a pain in the ass to get this running. But in the end it wasn’t. It was a ID10T issue. I didn’t understand what exactly it was supposed to do, exactly. But now I do and knowing is half the battle! What is a beautifier? Well it takes all that horribly formatted code and makes it all nice and pretty to work with and look at. Its so fucking helpful.

I had installed atom-beautify and its sub component php-cs-fixer. Upon opening a php file I received an error that php-cs-fixer could not be found. So it looks like I need to install it. Well the ATOM websites directions for installing php-cs-fixer on a mac are wrong. You need to visit FriendsOfPHP at Github. Those directions there do work.

I did a few things to try to get it to work, these are probably not the correct steps, but they got me there. In the end I am thinking one may be able to use the compose install and run with that, omitting the manual/curl install. Remember, I am on a mac (latest OS as of this writing).

I tried the composer install first.

But when I tried which php-cs-fixer I got nothing. Now I know I was using the wrong paths in hind-sight. If I were you I would try installing via composer then using the proper composer path in the settings. If that doesn’t work and you still get the error then you know you need to do the manual install as well. But I am thinking not.

Then I tried the homebrew, at first it was producing errors for read/write permissions on a folder. Persistence paid off and it eventually just installed without any errors. Go figure. But alas, doing which php-cs-fixer  produced nothing once again. So I tried the manual installation, as the others did not produce any positive results. From a terminal do this:


Turns out this comment also explains the same thing on how to install it.

Then, just run which php-cs-fixer, and it should hopefully give you good news (a path). I copied that path, and pasted it in the config settings for atom-beautify and php-cs-fixer. But that also produced the same errors from atom-beautify/php-cs-fixer. Then I found this In that picture lied my salvation. I was using the wrong path this whole time and didn’t know it. As soon as I changed the path for php-cs-fixer I was good to go. That path was:


Also of note, no matter what I did I was not able to get php php-cs-fixer  to work, never. I saw it posted all over but it never worked for me. So I did get it working, but I still thought it wasn’t working. Because it wasn’t doing anything (or so I thought). I was running the beautifier on all kinds of pages and I didn’t see any code change, I would even remove all indents and nothing! What the fuck dude? So I tried some html pages, and some JavaScript files. Those all worked just fine. It was just the php pages that were not working. Well as it turns out it was working just not how I though it should, which it should. All of the files I have that are php are intermixed php with html, for websites. I rarely have pages that are pure php. Well this plugin doesn’t structure html, at all. Or even call to the html formatter, as I think it should. It just formats pure php. So if you change the page type to html and run the beautifier it works just fine. I was expecting it to restructure all the contents of the php file, not just the actual php code. My mistake.

TLDR; php-cs-fixer just formats/indents pure php code, not php code intermixed with another language like html.. Also you need to update php5.6 to 7+ and I would install php-cs-fixer via composer, check your paths.

View Post

I am not responsible for anything that you fuck up or that goes wrong. Take these steps at your own risk. You have been warned.

Upgrading PHP on ClearOS (Part 1)

I need php higjer than 5.4 for a project. ClesrOS isn’t using 5.4+. Bastards. So here is my atyempt at upgesfing php on clearos 7. Some shit went vad during the upgrade,  i lost my original post which was more detailed. Typing this on my cell, I’ll clean up later. But for now here it is. Its a mess.

yum –enablerepo=clearos-updates-testing update

About 40 or so update it seems…hung up on kernel.x86_64 0:3.10.0-327.10.1.v7…then had dependency issues with libnatpmp. Hey at least it’s only one. And it has to do with Transmission. Which cannot be found in the repo’s, naturally. Which is for NAT routing.

Can’t install with yum, wont find it. Seem to vaguely remember this issue before, and maybe with Plex. Anyways found an RPM for Fedora EPEL7, gonna try that.

run testting update again

hanging on kernel again, dependency issues? …. NO! Woo hoo fixed the issue. Now to download 47mb of updates and hope the system doesn’t break!

Here’s where shit goes bad. I staryed the updates and they went ok. I saw the errors the other page mentioned, ok. All done it was. Complete it said. But the instructions say to reboot, which I had to cause the phpinfo page was still showing php 5.4. I rebooted. Which I fucking hate doing, because ClearOS can never seem to get an IP address from my modem when I do. Then I am stuck doing the IP dance. Fuck that noise. But I had to. 

Reboot went ok, fucker even tried to say I had an IP still, which I now believe was true. But the net wasn’t working. Nothing. So I spent an hour trying to get an IP from my modem. Nothing. At this point I am pissed off, and fuck ClearOS.

I connected my “emergency rotuer” and hopped on the web looking for a ClearOS alternative. Fucking shit. There isn’t one, and I just couldn’t come to terms with rolling my own. I need an easy way to manage IP addresses. I looked into some others but nothing debian or even centos based was any good for me. Everything is BSD. Don’t want that. Don’t know it. Don’t wanna learn it. So I reluctantly reinstalled ClearOS 7.2. No, its still having fucking problems. And now I am down to php 5.4 again. Fuck. 

I’ll edit this post later and clesn it up but for now…i was able to updste to php 5.5.33 but i lost all connections to the outside. Not 100% sure this was thr case but i am hanging it on a solid hunch. Back to square one.