Aug 26, 2016
· 5 minute read
webhow to
Didn’t exactly pick this all up today, rather this is my refined experience from setting up numerous virtual hosts (vhost) on numerous servers.
What follows requires at least Apache 2.4.
Useful Apache documentation:
Documentation index for current Apache version Environment variables Define variable in configuration file VirtualHost directive \
A few words on what the configuration below is trying to achieve.
A vhost configuration that can becopied from one serrver (e.
Read On →
Aug 19, 2016
· 1 minute read
php
Notes while I work on HHVM with a Drupal and CiviCRM site.
A default HHVM FastCGI installation with Apache works perfectly with Drupal and CiviCRM.
Running HHVM in server mode does not work out of the box.
1. Default HHVM install as FastCGI Add ProxyPassMatch to the Drupal virtual host configuration and restart Apache. Site should work normally with one useful side effect - slow SQL queries are logged to the HHVM error log, /var/log/hhvm/error.
Read On →
Aug 17, 2016
· 1 minute read
utilities
Pandoc
From the Pandoc about page:
If you need to convert files from one markup format into another, pandoc is your swiss-army knife. Pandoc can convert documents in markdown, reStructuredText, textile, HTML, DocBook, LaTeX, MediaWiki markup, TWiki markup, OPML, Emacs Org-Mode, Txt2Tags, Microsoft Word docx, LibreOffice ODT, EPUB, or Haddock markup to:
HTML formats: XHTML, HTML5, and HTML slide shows using Slidy, reveal.js, Slideous, S5, or DZSlides.
Read On →
Aug 17, 2016
· 1 minute read
linux
Use supervisor for process control, e.g. make Ghost run forever.
apt-get install supervisor systemctl start supervisor # start supervisor systemctl enable supervisor # enable supervisor start on boot Create a configuration file (for Ghost) in /etc/supervisor/conf.d, e.g. ghost.conf
[program:ghost-160] command = node /var/www/vhosts/whatdidilearn.today/index.js directory = /var/www/vhosts/whatdidilearn.today user = www-data autostart = true autorestart = true stdout_logfile = /var/log/supervisor/ghost160.log stderr_logfile = /var/log/supervisor/ghost160-err.log environment = NODE_ENV="production" Other useful commands:
~~~
~~
Aug 16, 2016
· 4 minute read
phphow to
Read the history of HHVM development by Facebook.
This article is based on the HHVM documentation and practical experience.
Install HHVM Based on the HHVM documentation. All run as root (or prefix commands with sudo where appropriate)
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449 echo deb http://dl.hhvm.com/debian jessie main | tee /etc/apt/sources.list.d/hhvm.list apt-get update apt-get install hhvm ... Setting up hhvm (3.14.5~jessie) ... ******************************************************************** * HHVM is installed. * * Running PHP web scripts with HHVM is done by having your * webserver talk to HHVM over FastCGI.
Read On →