Make Gadgets Work

While I love Ghost as a blogging platform, it is not best placed for things other than blogs - after all that is the basic idea behind creation of this wonderful tool. As I wanted to host a static website using tools that don't require a database or rely on php, I went searching on interwebs. I came across a lot of options and the most popular one appears to be Jekyll and it's variants (Nikola and such) but they require a lot of terminal activity which won't go well for regular end user responsible for maintaining content of the static website in question.So I continued looking and came across this wonderful project called Grav. Grav is super fast, very pretty and extremely easy to deploy and maintain. Additionally, it has very good documentation. The key features that I absolutely loved are as below: Easy installation - * Easier than Ghost / Wordpress IMHO * Good help and documentation Responsive themes and skeletons Built-in Markdown Support and then some Lot of useful plugins Browser based admin page Active development Easy upgrade and back-up My steps for installation: Download a skeleton you fancy unzip the downloaded file into your server root and move it into a folder named grav: sudo unzip grav-skeleton-appi-1.0.0.zip -d /var/www/html/ cd /var/www/html/ sudo mv grav-skeleton-appi-1.0.0/ grav/ Fix permissions (replace username with your user on the server. This is important to ensure files can be modified both from browser as well as from terminal. So create a bash file by issuing command nano fixpermissions.sh and paste the following code in there. ##!/bin/sh chown <username>:www-data . chown -R <username>:www-data * find . -type f | xargs chmod 664 find ./bin -type f | xargs chmod 775 find . -type d | xargs chmod 775 find . -type d | xargs chmod +s umask 0002 Now make this bash file executable using chmod a+x fixpermissions.sh Finally run the bash file from within the grav directory: cd /var/www/html/grav/ sudo bash /<path_to_fixpermissions.sh>/fixpermissions.sh Open <server-ip-address>/grav from the browser and check your install is working Once it is confirmed to be working, install admin plugin from terminal like so: /bin/gpm install admin Open <server-ip-address>/grav/admin from the browser and create your admin login details Working on Grav is an absolutely pleasing experience and the swift turnaround for a static website is phenomenal. Suffice to say, I hope that this project goes from strength to strength.

Grav - CMS with a difference

While I love Ghost as a blogging platform, it is not best placed for things other than blogs - after all that is the basic idea behind creation of this wonderful tool. As I wanted to host a static website using tools that don't require a database or rely on
As Windows 10 is a commercial offering, one would think it will be working as expected and it does so long as like me one has come to expect pain from Microsoft in general and Windows in particular - because pain is what you get when you use Windows 10. When we work in office environment we are not as heavily exposed to the pain that accompanies Windows usage, mainly because everything is configured and dealt with through a central desktop provisioning team and there is usually a dedicated IT Help-desk in a big corporate. However, using Windows at home is not as smooth a sailing (I am really being liberal with usage of word smooth) and if you don't trust me just try searching for issues that accompany upgrade to windows 10 and look at the range of issues. Now I, ofcourse, don't blindly believe these search based opinions and have my own take based on my very own personal trauma. The story goes like so: Why - one may ask - do I even bother with windows at home if it is so painful? This is because as much as my daughter loves the penguin, the windows is what her teacher uses and so she does need to be aware of the necessary evil. So, there is this laptop I have which is exclusively for Windows and is only ever used by my daughter for her schoolwork. It isn't some cheap stuff but a state of the art touch screen detachable monitor kinda laptop from HP with intel core i5 inside. However, as it is a detachable tablet, it has two HDD - 50 GB for monitor and 500 GB on keyboard that acts as extended memory. Now, it originally came with Windows 8 and then came Windows 10 followed by Windows 10 anniversary edition. When I upgraded from Windows 8 to Windows 10, I suddenly found that the whole of 50 gig was fully utilised making it impossible to do anything at all. Now a quick duckduckgo search later it was as simple as removing the "previous installs" which windows itself removes after a month or so they say. In my case the self-removal-a-month-later thing just did not happen and disk clean did not help either so i was basically left with no choice but to reformat the whole damn thing. This as I recollected from my old days with windows is quite a long process with lots of downloads and waits...and boy has that continued to be the same... Microsoft is nothing if not consistent. Finally after several hours of ordeal, the system was refreshed and my storage space reclaimed and a semi-functional laptop was there or thereabouts. I say semi-functional because unlike on Linux not all drivers are there and you have to individually download the drivers from HP website, install and then keep your fingers and toes crossed while you hope it works...finally sound was sorted but WiFi is still flaky. Now compare this to the seamless upgrade from one major version of Fedora 23 to Fedora 24...it did take a while to download and install but the actual effort involved was typing 4 lines on the terminal - that's it. When I logged into Fedora 24 upgraded machine, everything just worked as before - no driver issues, no WiFi problems, nothing. RANT OVER

Windows 10 - a bucket load of pain

As Windows 10 is a commercial offering, one would think it will be working as expected and it does so long as like me one has come to expect pain from Microsoft in general and Windows in particular - because pain is what you get when you use Windows 10.
Ethercalc is good tool which can be selfhosted. It is fairly simple to do so. Though it will be available for anyone who has the URL because there is no inbuilt login mechanism. I did not dig into making it accessible with a login interface as I lost interest after I made it work on my server and played around a bit with it but it was simply because I got interested in other things and not because the tool isn't fascinating enough. I am fairly certain this will not be overly complicated but for a simple selfhosted spreadsheet solution this is definitely worth playing around with. The steps I took are as below: #Ethercalc plays well wth redis as per their documentation. So Install and start "redis" sudo dnf install redis sudo systemctl start redis.service #Test if "redis" is working redis-cli ping #Enable redis to automatically start at the time of system start-up sudo systemctl enable redis.service #check if it runs ethercalc #Press Ctrl+C to exit #To run it forever use pm2 pm2 start ethercalc npm list -g --depth=0 #Change port to whichever port you want Ethercalc to run on by opening app.js #and changing port. nano /home/<yourusername>/.npm-global/lib/node_modules/ethercalc/app.js #change port and save #run with pm2 and alias as Ecalc pm2 start ethercalc --name "Ecalc" #check logs using pm2 pm2 logs Ecalc #Reverse proxy Ethercalc using nginx sudo nano /etc/nginx/conf.d/ecalc.conf sudo systemctl restart nginx.service

Ethercalc

Ethercalc is good tool which can be selfhosted. It is fairly simple to do so. Though it will be available for anyone who has the URL because there is no inbuilt login mechanism. I did not dig into making it accessible with a login interface as I lost interest after
After updating from Ubuntu 14.04, the php and Apache stopped being friends and one of the WordPress site I maintain went all white and admin page was just showing php code. This is apparently because of a known issue in 16.04 with upgrade to php7 as shown on the ubuntu forum here Using the guidance from this link and with some more of duckduckgo search later, I managed to resolve the problem thus: #1. Install aptitude if it is not already installed using sudo apt-get install aptitude #2. Removed php7 and unwanted php using sudo aptitude purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "` #3. Added old repo using sudo add-apt-repository ppa:ondrej/php #4. Updated repo sudo apt-get update #5. Installed php5.6 sudo apt-get install php5.6 sudo apt-get install php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml php5.6-curl php5.6-gd php5.6-zip #6. Checked php version sudo php -v #7. Enabled mod_php sudo a2enmod php5 Ignored error message #8. Opened php5.6 conf sudo nano /etc/apache2/mods-enabled/php5.6.conf #9. Commented following lines <IfModule mod_userdir.c> <Directory /home/*/public_html> php_admin_flag engine Off </Directory> </IfModule> #10. Restarted the server sudo service apache2 restart

Fix for PHP Issues after upgrade to Ubuntu 16.04.1 (Xenial)

After updating from Ubuntu 14.04, the php and Apache stopped being friends and one of the WordPress site I maintain went all white and admin page was just showing php code. This is apparently because of a known issue in 16.04 with upgrade to php7 as shown on
While the guidance on Ghost website is very clear, I did get issues that required steps in troubleshooting. Something to do with lodash and npm version 2 stuff (node_modules/knex requires lodash@'^3.7.0') that I read on one of the forums specifically the comment from ErisDS on 13/06. Anyway, reading this I deleted node_modules followed by npm install and it worked. All commands in order as I did are listed below. If my previous posts were used to create the blog nothing here will require sudo or root privileges. As before all this was done on Fedora 24 Linux OS and following commands will need to be changed where it mentions yoursite and username. If the path is different then obviously entire path needs to be replaced. #Copy the entire site as backup. It will be a verbose copy an all access rights will be preserved. cp -avr /var/www/html/yoursite /home/<username>/ #Now in the site directory create a directory ghostlatest mkdir /var/www/html/yoursite/ghostlatest #change directory to ghostlatest cd /var/www/html/yoursite/ghostlatest #now download the latest ghost zip file curl -LOk https://ghost.org/zip/ghost-latest.zip #unzip the downloaded file unzip ghost-latest.zip #stop your Ghost instance (assuming Ghost is the alias #created as per my previous post else replace with #whatever alias was used with pm2). pm2 stop Ghost #change directory and delete old folders and files cd /var/www/html/yoursite rm -rf core rm -rf index.js rm -rf *.md rm -rf *.json rm -rf /var/www/html/yoursite/content/themes/casper #remove node_modules because anyway the lodash issue will hit later on. rm -rf node_modules #copy from ghost latest to site directory new folders cp -avr /var/www/html/yoursite/ghostlatest/core /var/www/html/yoursite cp -avr /var/www/html/yoursite/ghostlatest/index.js /var/www/html/yoursite cp -avr /var/www/html/yoursite/ghostlatest/*.md /var/www/html/yoursite cp -avr /var/www/html/yoursite/ghostlatest/*.json /var/www/html/yoursite #optional if you haven't made customisation to default theme. cp -avr /var/www/html/yoursite/ghostlatest/content/themes/casper /var/www/html/yoursite/content/themes #Install Latest Version npm cache clean npm update npm install --production #Start to update dependencies npm start --production #Once above command is complete, stop the server and restart using pm2 Ctrl+C pm2 start Ghost

Update Ghost on Fedora

While the guidance on Ghost website is very clear, I did get issues that required steps in troubleshooting. Something to do with lodash and npm version 2 stuff (node_modules/knex requires lodash@'^3.7.0') that I read on one of the forums specifically the comment from ErisDS