Going to keep this short and sweet. In the past I’ve always run vanilla *NiX boxes. Why? well I’ve been at this a while since I was a kid in the 80’s so there’s that. Command lines are natural to my gen. But in recent years unlike many of the “do everything command line” fanboi’s the reality is that sometimes its nice to have some sort of management UI. If you are argue that you’re doing just that, being argumentative.
So recently I checkout the two SBS flavors for Linux. That being ClearOS and Zentyal. The former runs on CentOS where Zentyal runs on Ubuntu. First I’m a fan of Ubuntu they are doing some nice work and their desktop is one of my favs. With that said I’m not as confident with Ubuntu’s server. Be clear that doesn’t mean its not solid. In fact if you roll the LTS version you should be good for updates/fixes for sometime. What I will say is that although CentOS can be a pain package-wise it is very stable. There’s a reason many third parties bundle with CentOS. It may be slow to the latest and greatest but isn’t as likely to break either.
With Zentyal I have to be honest I like the GUI its pretty cool. The scaled back GUI for the desktop that it boots to automatically is handy. Just remember GUI’s take resources so if you have limited ponies don’t run it, just use the Web UI. I did find the Zentyal GUI on the desktop to be a little clunky at times. It’s cool but…I probably wouldn’t run it. This was tested on an older chip. Quad Core with 16GB of ram. Not a slow box but not Xeon or i7 either.
ClearOS’s GUI is laid out very nice. Its clean and concise. It doesn’t have the fancy fell that Zentyal does but in my opinion that’s not a negative. Might even be a plus actually. Also had better hardware detection with ClearOS, but that’s more about Cent really.
In short there are a couple things to consider. If you want bells and whistles go with Zentyal and Ubuntu. If you want solid stable battle tested go with ClearOS and Cent. I want to be clear Ubuntu is very stable, but CentOS is a true enterprise build with slow strategic and tested updates.
What would I choose
I’d go ClearOS and in fact did for a box just to have it around. I still like to run my own vanilla boxes just so I know there’s not some issue updating a package or something that the GUI management software doesn’t like.
Pretty simple really
# rm -rf ~/.npm
# npm cache clear
Use this process when you need to make sure a package isn’t loading anything from npm’s cache. Say you’ve updated or did a force update of your package and you need to make sure it pulls everything down and updates changes.
From time to time I create projects that need to be supported by both Windows and *NIX systems. Line endings are always a pain and although GIT has helped this a lot there are still issues at times that you must deal with manually.
Here is a quick way to output a project and convert line endings all in one. This is not difficult but probably won’t make much sense unless you’ve messed with .cmd or .bat files in the past.
First grab dos2unix here. You’ll need to select the correct binary for your platform either 32bit or 64bit. As of today 6.0.3 is the current version.
Save the below to “your_project_name.bat”
CALL publish.bat -r -s %source% -d %dest%
ECHO Converting files to unix line endings…
SET exts=*.json, *.js
FOR %%f in (%exts%) DO (
CALL %d2upath%\dos2unix %%f
ECHO Finished publishing.
Save the following to “publish.bat”
REM Set npm path, default build directory various variables.
REM No args passed use defaults goto dependency check.
IF [%~1]== GOTO :HELP
IF /i %~1==-h GOTO :HELP
REM Loop over args and assign them.
IF [%~1]== GOTO :DIREXISTS
IF /i %~1==-s (
SET /a sourceIdx=%ctr%+1
IF /i %~1==-d (
SET /a destIdx=%ctr%+1
IF /i %~1==-r (
IF %ctr%==%sourceIdx% (
IF %lastArg%==-s SET sourceDir=%~1
IF %ctr%==%destIdx% (
IF %lastArg%==-d SET destDir=%~1
SET /a ctr+=1
SHIFT & GOTO :SETARGS
IF EXIST %destDir% GOTO :PUBLISH
SET /p create=”Directory “%destDir%” does not exist, would you like to create it (y or n)?”
IF %create%==y (
ECHO Creating directory…
ECHO Nothing to do, no output directory exiting…
ECHO PUBLISHING: %sourceDir% to %destDir%
IF %empty%==y (
ECHO Removing files and subfolders.
RD %destDir% /s /q
ECHO Publishing please wait…
IF EXIST pubignore.txt (
XCOPY /s /y /EXCLUDE:pubignore.txt %sourceDir%\* %destDir%
) ELSE (
XCOPY /s /y %sourceDir%\* %destDir%
ECHO HELP: Publish Script Help.
ECHO -s (specify source, default is current directory.)
ECHO -d (specify destination directory [required].)
ECHO -r (remove directory and re-create)
Create a text file with the name “pubignore.txt”
In this file you can put in files you want it to ignore when it copies the files from your source to your destination that you created in “your_project_name.bat”. This uses the standard xcopy EXCLUDE formatting.
NOTE: in the “your_project_name.bat” you can specify file extension types that you want dos2unix to convert also do this where it says “SET exts=*.json, *.js”
Created the files now what?
So once you’ve created all three files you have a couple options. You can put them all in the same folder as your project and then cd D:\Your\Project\Path. Where again “D” is the drive your project is in, then simply run “your_project_name.bat”.
The other option is to create a “Scripts” folder somewhere on your machine and then dump all but pubignore.txt (it needs to go in the project folder itself) in that folder. Lastly in your environment variables for your path include the path to the scripts folder. You can do this using the link I provided above or through the command line. Just Google it if you don’t quite get it. Once you do that you can just run “your_project_name.bat” from anywhere and it will do its job. This is in fact what I do and often call it from Visual Studio on build.
Xipframe MVC Framework
Check it out here.
Download it via NPM here.