This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const Hapi = require('hapi'); | |
const server = new Hapi.Server(); | |
server.connection({ port: 8000 }); | |
// test by using this on command line: | |
// http GET localhost:8000 | |
server.ext('onRequest', (request, response) => { | |
console.log('onRequest'); |
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
- Introduction
- Installing Node.js
- Installing MySQL
- Setting-up the project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* +90% based on the article of Chris Valleriani | |
* http://chrisvall.com/coding/php-easy-to-use-logging-class-for-your-scripts | |
* | |
* My changes: | |
* | |
* - force default timezone; | |
* - defines a base dir for log files output |
Overview
Localizing/internationalizing any PHP application is easy through gettext functions. Basically you'll have a set of localization files (*.po
) that have a binary format version (*.mo
) across a simple and standard directory structure. Then gettext functions will use existing binary files based on current language locale.
Directory structure and localization files
locale/
├── en_US
│ └── LC_MESSAGES
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# | |
# Source https://raw.github.com/jnstq/rails-nginx-passenger-ubuntu/master/nginx/nginx | |
# | |
# Provides: nginx | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 |